diff options
Diffstat (limited to 'src/lib/cert/x509/x509path.cpp')
-rw-r--r-- | src/lib/cert/x509/x509path.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/cert/x509/x509path.cpp b/src/lib/cert/x509/x509path.cpp index 436e27d39..c08b11d42 100644 --- a/src/lib/cert/x509/x509path.cpp +++ b/src/lib/cert/x509/x509path.cpp @@ -28,7 +28,8 @@ find_issuing_cert(const X509_Certificate& cert, const X509_DN issuer_dn = cert.issuer_dn(); const std::vector<byte> auth_key_id = cert.authority_key_id(); - if(const X509_Certificate* c = end_certs.find_cert(issuer_dn, auth_key_id)) + const X509_Certificate* c = end_certs.find_cert(issuer_dn, auth_key_id); + if(c && *c != cert) return c; for(size_t i = 0; i != certstores.size(); ++i) |