Skip to content

Instantly share code, notes, and snippets.

@Slarky
Created January 5, 2017 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Slarky/53b6a76b6c2e9bbfe0147fb3a982cb5e to your computer and use it in GitHub Desktop.
Save Slarky/53b6a76b6c2e9bbfe0147fb3a982cb5e to your computer and use it in GitHub Desktop.
--- src/core/network-openssl.c.orig Tue Jan 3 14:36:46 2017
+++ src/core/network-openssl.c Thu Jan 5 22:07:47 2017
@@ -646,7 +646,9 @@
#ifdef SSL_get_server_tmp_key
// Show ephemeral key information.
EVP_PKEY *ephemeral_key = NULL;
+#ifndef OPENSSL_NO_EC
EC_KEY *ec_key = NULL;
+#endif
char *ephemeral_key_algorithm = NULL;
char *cname = NULL;
int nid;
@@ -658,6 +660,7 @@
tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
break;
+#ifndef OPENSSL_NO_EC
case EVP_PKEY_EC:
ec_key = EVP_PKEY_get1_EC_KEY(ephemeral_key);
nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec_key));
@@ -670,6 +673,7 @@
g_free_and_null(ephemeral_key_algorithm);
break;
+#endif
default:
tls_rec_set_ephemeral_key_algorithm(tls, "Unknown");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment