- Drop gsoap-openssl110.patch (included upstream)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=81
This commit is contained in:
Jan Engelhardt 2017-01-19 16:15:56 +00:00 committed by Git OBS Bridge
parent 41429e53e7
commit 6ed0b092ae
3 changed files with 2 additions and 170 deletions

View File

@ -1,168 +0,0 @@
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;

View File

@ -9,6 +9,7 @@ Thu Jan 19 09:06:14 UTC 2017 - jengelh@inai.de
`SOAP_ENC_MTOM`).
* Improved CORS internals and compatibility.
* Fixed minor issues with `WITH_NOIO` and `WITH_NO_C_LOCALE`.
- Drop gsoap-openssl110.patch (included upstream)
-------------------------------------------------------------------
Tue Dec 13 09:34:31 UTC 2016 - jengelh@inai.de

View File

@ -30,7 +30,6 @@ 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
@ -85,7 +84,7 @@ available or under development.
%prep
%setup -q
cmp gsoap/stdsoap2.cpp gsoap/stdsoap2.c
%patch -P 1 -P 2 -P 3 -p1
%patch -P 1 -P 2 -p1
ln -fs stdsoap2.cpp gsoap/stdsoap2.c
%build