From 87ad846602a3c17a09006bd60fd8a82c0b778913 Mon Sep 17 00:00:00 2001 From: jow Date: Sun, 20 Feb 2011 15:04:51 +0000 Subject: [PATCH] [packages] nzbget: fix compilation against OpenSSL v1.x (#8893) git-svn-id: svn://svn.openwrt.org/openwrt/packages@25606 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../patches/001-openssl-1.0.0-compat.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 net/nzbget/patches/001-openssl-1.0.0-compat.patch diff --git a/net/nzbget/patches/001-openssl-1.0.0-compat.patch b/net/nzbget/patches/001-openssl-1.0.0-compat.patch new file mode 100644 index 000000000..04374abf3 --- /dev/null +++ b/net/nzbget/patches/001-openssl-1.0.0-compat.patch @@ -0,0 +1,32 @@ +--- a/TLS.cpp ++++ b/TLS.cpp +@@ -908,7 +908,7 @@ int tls_check_cert(tls_t *tls, const cha + char *buf; + int bufsize; + /* needed to get the DNS subjectAltNames: */ +- STACK *subj_alt_names; ++ STACK_OF(GENERAL_NAME) *subj_alt_names; + int subj_alt_names_count; + GENERAL_NAME *subj_alt_name; + /* did we find a name matching hostname? */ +@@ -960,7 +960,7 @@ int tls_check_cert(tls_t *tls, const cha + /* Try the DNS subjectAltNames. */ + match_found = 0; + if ((subj_alt_names = +- (STACK*)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL))) ++ (STACK_OF(GENERAL_NAME) *)X509_get_ext_d2i(x509cert, NID_subject_alt_name, NULL, NULL))) + { + subj_alt_names_count = sk_GENERAL_NAME_num(subj_alt_names); + for (i = 0; i < subj_alt_names_count; i++) +@@ -1105,7 +1105,11 @@ int tls_init(tls_t *tls, const char *key + + #ifdef HAVE_OPENSSL + ++ #if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ const SSL_METHOD *ssl_method = NULL; ++ #else + SSL_METHOD *ssl_method = NULL; ++ #endif + + ssl_method = force_sslv3 ? SSLv3_client_method() : SSLv23_client_method(); + if (!ssl_method)