diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-12-29 23:38:20 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-12-29 23:38:20 +0000 |
commit | b252cf0d9803b7b4407c5d9ec0644da1ca4a0886 (patch) | |
tree | 33c25cb04803f7f9bfd18b7098a6a7bd6cc722c9 /apps/apps.c | |
parent | a4c4a7d5cafaf7e0933d024d189f72b2e350b628 (diff) |
make JPAKE work again, fix memory leaks
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/apps.c b/apps/apps.c index 984582111c..15f2069c95 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -2864,6 +2864,9 @@ void jpake_client_auth(BIO *out, BIO *conn, const char *secret) BIO_puts(out, "JPAKE authentication succeeded, setting PSK\n"); + if (psk_key) + OPENSSL_free(psk_key); + psk_key = BN_bn2hex(JPAKE_get_shared_key(ctx)); BIO_pop(bconn); @@ -2893,6 +2896,9 @@ void jpake_server_auth(BIO *out, BIO *conn, const char *secret) BIO_puts(out, "JPAKE authentication succeeded, setting PSK\n"); + if (psk_key) + OPENSSL_free(psk_key); + psk_key = BN_bn2hex(JPAKE_get_shared_key(ctx)); BIO_pop(bconn); |