diff options
author | Alexander Færøy <ahf@0x90.dk> | 2016-10-19 23:38:21 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2016-10-22 22:04:32 +0200 |
commit | f533baa191428b3cbdbba151d575b69e3a783f68 (patch) | |
tree | 1cebe49ce5309e365fc06d175b30bf13c55c7507 /src | |
parent | 25824e2d3fb42def5efbb59ff34a51e31af04ec8 (diff) | |
download | irssi-f533baa191428b3cbdbba151d575b69e3a783f68.zip |
Lift EC_KEY declaration onto the entry of the function.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/network-openssl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 8c258eca..4c6b75dd 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -685,6 +685,7 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl) #ifdef SSL_get_server_tmp_key // Show ephemeral key information. EVP_PKEY *ephemeral_key = NULL; + EC_KEY *ec_key = NULL; char *ephemeral_key_algorithm = NULL; char *cname = NULL; int nid; @@ -697,10 +698,9 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl) break; case EVP_PKEY_EC: - { - EC_KEY *ec = EVP_PKEY_get1_EC_KEY(ephemeral_key); - nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec)); - EC_KEY_free(ec); + ec_key = EVP_PKEY_get1_EC_KEY(ephemeral_key); + nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec_key)); + EC_KEY_free(ec_key); cname = (char *)OBJ_nid2sn(nid); ephemeral_key_algorithm = g_strdup_printf("ECDH: %s", cname); |