1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-14 11:23:57 +02:00
openwrt-packages/net/umurmur/patches/010-deprecated-openssl.patch
Rosen Penev ff6d181c5f umurmur: Fix compilation without OpenSSL ECC support
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2018-12-06 15:44:59 -08:00

25 lines
663 B
Diff

--- a/src/ssli_openssl.c
+++ b/src/ssli_openssl.c
@@ -46,6 +46,9 @@
#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/safestack.h>
+#ifndef OPENSSL_NO_EC
+#include <openssl/ec.h>
+#endif
static X509 *x509;
static RSA *rsa;
static SSL_CTX *context;
@@ -253,9 +256,11 @@ void SSLi_init(void)
SSL_CTX_set_options(context, SSL_OP_CIPHER_SERVER_PREFERENCE);
SSL_CTX_set_cipher_list(context, ciphers);
+#ifndef OPENSSL_NO_EC
EC_KEY *ecdhkey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
SSL_CTX_set_tmp_ecdh(context, ecdhkey);
EC_KEY_free(ecdhkey);
+#endif
char const * sslCAPath = getStrConf(CAPATH);
if(sslCAPath != NULL)