SHA256
1
0
forked from pool/gsoap
gsoap/gsoap-sslverify.diff

23 lines
899 B
Diff

---
gsoap/stdsoap2.cpp | 7 +++++++
1 file changed, 7 insertions(+)
Index: gsoap-2.8.43/gsoap/stdsoap2.cpp
===================================================================
--- gsoap-2.8.43.orig/gsoap/stdsoap2.cpp
+++ gsoap-2.8.43/gsoap/stdsoap2.cpp
@@ -3672,6 +3672,13 @@ soap_ssl_error(struct soap *soap, int re
while ((r = ERR_get_error()))
{ size_t l = strlen(soap->msgbuf);
ERR_error_string_n(r, soap->msgbuf + l, sizeof(soap->msgbuf) - l);
+ l = strlen(soap->msgbuf);
+ if (l + 1 < sizeof(soap->msgbuf))
+ soap->msgbuf[l++] = '\n';
+ if (ERR_GET_REASON(r) == SSL_R_CERTIFICATE_VERIFY_FAILED && l <= sizeof(soap->msgbuf)) {
+ const char *reason = X509_verify_cert_error_string(SSL_get_verify_result(soap->ssl));
+ (SOAP_SNPRINTF(soap->msgbuf + l, sizeof(soap->msgbuf) - l, strlen(reason)), "%s", reason);
+ }
}
}
else