diff --git a/gsoap-openssl110.patch b/gsoap-openssl110.patch new file mode 100644 index 0000000..e0459bd --- /dev/null +++ b/gsoap-openssl110.patch @@ -0,0 +1,168 @@ +From: http://ftp.gwdg.org/pub/linux/debian/debian/pool/main/g/gsoap/gsoap_2.8.35-4.debian.tar.xz + +diff -ur gsoap-2.8.34.orig/gsoap/plugin/mecevp.c gsoap-2.8.34/gsoap/plugin/mecevp.c +--- gsoap-2.8.34.orig/gsoap/plugin/mecevp.c 2016-08-17 13:36:00.000000000 +0200 ++++ gsoap-2.8.34/gsoap/plugin/mecevp.c 2016-09-09 15:30:48.416000000 +0200 +@@ -284,10 +284,15 @@ + int ok = 1; + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "soap_mec_init()\n")); + soap_ssl_init(); ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + data->ctx = (EVP_CIPHER_CTX*)SOAP_MALLOC(soap, sizeof(EVP_CIPHER_CTX)); ++ if (data->ctx) ++ EVP_CIPHER_CTX_init(data->ctx); ++#else ++ data->ctx = EVP_CIPHER_CTX_new(); ++#endif + if (!data->ctx) + return soap->error = SOAP_EOM; +- EVP_CIPHER_CTX_init(data->ctx); + data->alg = alg; + data->state = SOAP_MEC_STATE_NONE; + data->restidx = 0; +@@ -443,8 +448,12 @@ + data->type = NULL; + if (data->ctx) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_CIPHER_CTX_cleanup(data->ctx); + SOAP_FREE(soap, data->ctx); ++#else ++ EVP_CIPHER_CTX_free(data->ctx); ++#endif + data->ctx = NULL; + } + if (data->buf) +diff -ur gsoap-2.8.34.orig/gsoap/plugin/smdevp.c gsoap-2.8.34/gsoap/plugin/smdevp.c +--- gsoap-2.8.34.orig/gsoap/plugin/smdevp.c 2016-08-17 13:36:00.000000000 +0200 ++++ gsoap-2.8.34/gsoap/plugin/smdevp.c 2016-09-09 14:59:46.348000000 +0200 +@@ -479,17 +479,27 @@ + /* allocate and init the OpenSSL HMAC or EVP_MD context */ + if ((alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + data->ctx = (void*)SOAP_MALLOC(soap, sizeof(HMAC_CTX)); ++ if (data->ctx) ++ HMAC_CTX_init((HMAC_CTX*)data->ctx); ++#else ++ data->ctx = (void*)HMAC_CTX_new(); ++#endif + if (!data->ctx) + return soap_set_receiver_error(soap, "soap_smd_init() failed", "No context", SOAP_SSL_ERROR); +- HMAC_CTX_init((HMAC_CTX*)data->ctx); + } + else + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + data->ctx = (void*)SOAP_MALLOC(soap, sizeof(EVP_MD_CTX)); ++ if (data->ctx) ++ EVP_MD_CTX_init((EVP_MD_CTX*)data->ctx); ++#else ++ data->ctx = (void*)EVP_MD_CTX_new(); ++#endif + if (!data->ctx) + return soap_set_receiver_error(soap, "soap_smd_init() failed", "No context", SOAP_SSL_ERROR); +- EVP_MD_CTX_init((EVP_MD_CTX*)data->ctx); + } + DBGLOG(TEST, SOAP_MESSAGE(fdebug, "-- SMD Init alg=%x (%p) --\n", alg, data->ctx)); + /* init the digest or signature computations */ +@@ -634,11 +644,22 @@ + *len = (int)n; + } + /* cleanup */ +- if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) ++ if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + HMAC_CTX_cleanup((HMAC_CTX*)data->ctx); +- else ++ SOAP_FREE(soap, data->ctx); ++#else ++ HMAC_CTX_free((HMAC_CTX*)data->ctx); ++#endif ++ } ++ else { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_MD_CTX_cleanup((EVP_MD_CTX*)data->ctx); +- SOAP_FREE(soap, data->ctx); ++ SOAP_FREE(soap, data->ctx); ++#else ++ EVP_MD_CTX_free((EVP_MD_CTX*)data->ctx); ++#endif ++ } + data->ctx = NULL; + /* check and return */ + return soap_smd_check(soap, data, ok, "soap_smd_final() failed"); +@@ -672,11 +693,22 @@ + } + if (data->ctx) + { +- if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) ++ if ((data->alg & SOAP_SMD_ALGO) == SOAP_SMD_HMAC) { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + HMAC_CTX_cleanup((HMAC_CTX*)data->ctx); +- else ++ SOAP_FREE(soap, data->ctx); ++#else ++ HMAC_CTX_free((HMAC_CTX*)data->ctx); ++#endif ++ } ++ else { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L + EVP_MD_CTX_cleanup((EVP_MD_CTX*)data->ctx); +- SOAP_FREE(soap, data->ctx); ++ SOAP_FREE(soap, data->ctx); ++#else ++ EVP_MD_CTX_free((EVP_MD_CTX*)data->ctx); ++#endif ++ } + data->ctx = NULL; + } + return soap_set_receiver_error(soap, msg, soap->msgbuf, SOAP_SSL_ERROR); +diff -ur gsoap-2.8.34.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp gsoap-2.8.34/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp +--- gsoap-2.8.34.orig/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp 2016-08-17 13:36:04.000000000 +0200 ++++ gsoap-2.8.34/gsoap/samples/calc_vs2005/calc_vs2005/stdsoap2.cpp 2016-09-09 13:22:07.488000000 +0200 +@@ -5061,7 +5061,7 @@ + break; + name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); + if (name) +- { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name))) ++ { if (!soap_tag_cmp(host, (const char*)ASN1_STRING_data(name))) + ok = 1; + else + { unsigned char *tmp = NULL; +diff -ur gsoap-2.8.34.orig/gsoap/stdsoap2.c gsoap-2.8.34/gsoap/stdsoap2.c +--- gsoap-2.8.34.orig/gsoap/stdsoap2.c 2016-08-17 13:36:06.000000000 +0200 ++++ gsoap-2.8.34/gsoap/stdsoap2.c 2016-09-09 13:22:07.488000000 +0200 +@@ -5061,7 +5061,7 @@ + break; + name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); + if (name) +- { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name))) ++ { if (!soap_tag_cmp(host, (const char*)ASN1_STRING_data(name))) + ok = 1; + else + { unsigned char *tmp = NULL; +diff -ur gsoap-2.8.34.orig/gsoap/stdsoap2.cpp gsoap-2.8.34/gsoap/stdsoap2.cpp +--- gsoap-2.8.34.orig/gsoap/stdsoap2.cpp 2016-08-17 13:36:06.000000000 +0200 ++++ gsoap-2.8.34/gsoap/stdsoap2.cpp 2016-09-09 13:22:07.488000000 +0200 +@@ -5061,7 +5061,7 @@ + break; + name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); + if (name) +- { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name))) ++ { if (!soap_tag_cmp(host, (const char*)ASN1_STRING_data(name))) + ok = 1; + else + { unsigned char *tmp = NULL; +diff -ur gsoap-2.8.34.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp gsoap-2.8.34/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp +--- gsoap-2.8.34.orig/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp 2016-08-17 13:36:06.000000000 +0200 ++++ gsoap-2.8.34/gsoap/VisualStudio2005/wsdl2h/wsdl2h/stdsoap2.cpp 2016-09-09 13:22:07.488000000 +0200 +@@ -5061,7 +5061,7 @@ + break; + name = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subj, i)); + if (name) +- { if (!soap_tag_cmp(host, (const char*)M_ASN1_STRING_data(name))) ++ { if (!soap_tag_cmp(host, (const char*)ASN1_STRING_data(name))) + ok = 1; + else + { unsigned char *tmp = NULL; diff --git a/gsoap.changes b/gsoap.changes index aadc7eb..07dc9a7 100644 --- a/gsoap.changes +++ b/gsoap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 13 09:34:31 UTC 2016 - jengelh@inai.de + +- Add gsoap-openssl110.patch to support OpenSSL 1.1.0 + ------------------------------------------------------------------- Sun Dec 11 20:29:51 UTC 2016 - jengelh@inai.de diff --git a/gsoap.spec b/gsoap.spec index 8c40504..a3dd30a 100644 --- a/gsoap.spec +++ b/gsoap.spec @@ -30,6 +30,7 @@ Source: gsoap-%version.tar.xz Source2: sanitize_source.sh Patch1: gsoap-automake1_13.diff Patch2: gsoap-01-sharedlibs.diff +Patch3: gsoap-openssl110.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -84,7 +85,7 @@ available or under development. %prep %setup -q cmp gsoap/stdsoap2.cpp gsoap/stdsoap2.c -%patch -P 1 -P 2 -p1 +%patch -P 1 -P 2 -P 3 -p1 ln -fs stdsoap2.cpp gsoap/stdsoap2.c %build