umurmur: Fix compilation without OpenSSL ECC support
authorRosen Penev <redacted>
Mon, 26 Nov 2018 03:34:57 +0000 (19:34 -0800)
committerRosen Penev <redacted>
Thu, 6 Dec 2018 23:44:59 +0000 (15:44 -0800)
Signed-off-by: Rosen Penev <redacted>
net/umurmur/Makefile
net/umurmur/patches/010-deprecated-openssl.patch [new file with mode: 0644]

index b35d29d560d08c3d43f9bafcd8560d969632783c..6ce30ff3ab63e5fdfb1e68173bc1038fcdc72f1c 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=umurmur
 PKG_VERSION:=0.2.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
diff --git a/net/umurmur/patches/010-deprecated-openssl.patch b/net/umurmur/patches/010-deprecated-openssl.patch
new file mode 100644 (file)
index 0000000..88db5b7
--- /dev/null
@@ -0,0 +1,24 @@
+--- 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)
git clone https://git.99rst.org/PROJECT