aboutsummaryrefslogtreecommitdiffstats
path: root/hs20
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-07-01 22:43:33 (GMT)
committerJouni Malinen <j@w1.fi>2014-07-02 09:38:48 (GMT)
commitd1ecca6c15311ff192841e78ebf2b338f2fc31cd (patch)
treefab0dfb0364ebb55d94149cad7a998f886bea633 /hs20
parent0a13e06bdba710cc7e6ea8da391a595b5d33aba6 (diff)
downloadhostap-d1ecca6c15311ff192841e78ebf2b338f2fc31cd.zip
hostap-d1ecca6c15311ff192841e78ebf2b338f2fc31cd.tar.gz
hostap-d1ecca6c15311ff192841e78ebf2b338f2fc31cd.tar.bz2
HS 2.0 R2: Clear hs20-osu-client configuration keys explicitly
Use an explicit memset call to clear any hs20-osu-client configuration parameter that contains private information like keys or identity. This brings in an additional layer of protection by reducing the length of time this type of private data is kept in memory. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hs20')
-rw-r--r--hs20/client/osu_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c
index ea269ab..a439bde 100644
--- a/hs20/client/osu_client.c
+++ b/hs20/client/osu_client.c
@@ -2495,7 +2495,7 @@ static void cmd_sub_rem(struct hs20_osu_client *ctx, const char *address,
xml_node_get_text_free(ctx->xml, sub_rem_uri);
xml_node_get_text_free(ctx->xml, cred_username);
- os_free(cred_password);
+ str_clear_free(cred_password);
xml_node_free(ctx->xml, pps);
}
@@ -2642,7 +2642,7 @@ static int cmd_pol_upd(struct hs20_osu_client *ctx, const char *address,
xml_node_get_text_free(ctx->xml, uri);
xml_node_get_text_free(ctx->xml, cred_username);
- os_free(cred_password);
+ str_clear_free(cred_password);
xml_node_free(ctx->xml, pps);
return 0;