Jan Engelhardt
59c6535b2c
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/gsoap?expand=0&rev=78
169 lines
6.5 KiB
Diff
169 lines
6.5 KiB
Diff
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;
|