Blame SOURCES/xmlSecOpenSSLX509DataNodeRead-error.patch

219aeb
Please see this bug report for full details:
219aeb
https://github.com/lsh123/xmlsec/issues/164
219aeb
219aeb
commit e303e077fb3e13654ba711b2816ff1a94247338b
219aeb
Author: lsh123 <aleksey@aleksey.com>
219aeb
Date:   Wed Apr 11 17:13:43 2018 -1000
219aeb
219aeb
    Add missing return(-1). (#165)
219aeb
    
219aeb
    Fixed issue #164. All other crypto libraries are ok.
219aeb
219aeb
diff --git a/src/openssl/x509.c b/src/openssl/x509.c
219aeb
index 15fe70db..b98e62d1 100644
219aeb
--- a/src/openssl/x509.c
219aeb
+++ b/src/openssl/x509.c
219aeb
@@ -870,6 +870,7 @@ xmlSecOpenSSLX509DataNodeRead(xmlSecKeyDataPtr data, xmlNodePtr node, xmlSecKeyI
219aeb
                 xmlSecInternalError2("xmlSecOpenSSLX509CertificateNodeRead",
219aeb
                                      xmlSecKeyDataGetName(data),
219aeb
                                      "node=%s", xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
219aeb
+                return(-1);
219aeb
             }
219aeb
         } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509SubjectName, xmlSecDSigNs)) {
219aeb
             ret = xmlSecOpenSSLX509SubjectNameNodeRead(data, cur, keyInfoCtx);
219aeb
@@ -877,6 +878,7 @@ xmlSecOpenSSLX509DataNodeRead(xmlSecKeyDataPtr data, xmlNodePtr node, xmlSecKeyI
219aeb
                 xmlSecInternalError2("xmlSecOpenSSLX509SubjectNameNodeRead",
219aeb
                                      xmlSecKeyDataGetName(data),
219aeb
                                      "node=%s", xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
219aeb
+                return(-1);
219aeb
             }
219aeb
         } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509IssuerSerial, xmlSecDSigNs)) {
219aeb
             ret = xmlSecOpenSSLX509IssuerSerialNodeRead(data, cur, keyInfoCtx);
219aeb
@@ -884,6 +886,7 @@ xmlSecOpenSSLX509DataNodeRead(xmlSecKeyDataPtr data, xmlNodePtr node, xmlSecKeyI
219aeb
                 xmlSecInternalError2("xmlSecOpenSSLX509IssuerSerialNodeRead",
219aeb
                                      xmlSecKeyDataGetName(data),
219aeb
                                      "node=%s", xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
219aeb
+                return(-1);
219aeb
             }
219aeb
         } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509SKI, xmlSecDSigNs)) {
219aeb
             ret = xmlSecOpenSSLX509SKINodeRead(data, cur, keyInfoCtx);
219aeb
@@ -891,6 +894,7 @@ xmlSecOpenSSLX509DataNodeRead(xmlSecKeyDataPtr data, xmlNodePtr node, xmlSecKeyI
219aeb
                 xmlSecInternalError2("xmlSecOpenSSLX509SKINodeRead",
219aeb
                                      xmlSecKeyDataGetName(data),
219aeb
                                      "node=%s", xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
219aeb
+                return(-1);
219aeb
             }
219aeb
         } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509CRL, xmlSecDSigNs)) {
219aeb
             ret = xmlSecOpenSSLX509CRLNodeRead(data, cur, keyInfoCtx);
219aeb
@@ -898,6 +902,7 @@ xmlSecOpenSSLX509DataNodeRead(xmlSecKeyDataPtr data, xmlNodePtr node, xmlSecKeyI
219aeb
                 xmlSecInternalError2("xmlSecOpenSSLX509CRLNodeRead",
219aeb
                                      xmlSecKeyDataGetName(data),
219aeb
                                      "node=%s", xmlSecErrorsSafeString(xmlSecNodeGetName(cur)));
219aeb
+                return(-1);
219aeb
             }
219aeb
         } else if((keyInfoCtx->flags & XMLSEC_KEYINFO_FLAGS_X509DATA_STOP_ON_UNKNOWN_CHILD) != 0) {
219aeb
             /* laxi schema validation: ignore unknown nodes */