aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/cert
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-10-31 11:31:27 +0000
committerlloyd <[email protected]>2014-10-31 11:31:27 +0000
commit083f699c30d584ac59453139e4f2e03d1fde0545 (patch)
treed9cc192ace03a9a0ef1c0e1705d5468ff3eb3489 /src/lib/cert
parentaf0cc3c7308d0f5320e82394590b0ca93f43c4d4 (diff)
Fix various warnings from VC++ 2014 and add missing include
Diffstat (limited to 'src/lib/cert')
-rw-r--r--src/lib/cert/x509/certstor.h2
-rw-r--r--src/lib/cert/x509/x509path.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/cert/x509/certstor.h b/src/lib/cert/x509/certstor.h
index 8c9fd9610..79a33f75d 100644
--- a/src/lib/cert/x509/certstor.h
+++ b/src/lib/cert/x509/certstor.h
@@ -31,7 +31,7 @@ class BOTAN_DLL Certificate_Store
bool certificate_known(const X509_Certificate& cert) const
{
- return find_cert(cert.subject_dn(), cert.subject_key_id());
+ return find_cert(cert.subject_dn(), cert.subject_key_id()) != nullptr;
}
// remove this (used by TLS::Server)
diff --git a/src/lib/cert/x509/x509path.cpp b/src/lib/cert/x509/x509path.cpp
index e8e44f653..73a5a158b 100644
--- a/src/lib/cert/x509/x509path.cpp
+++ b/src/lib/cert/x509/x509path.cpp
@@ -30,13 +30,13 @@ 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* cert = end_certs.find_cert(issuer_dn, auth_key_id))
- return cert;
+ if(const X509_Certificate* c = end_certs.find_cert(issuer_dn, auth_key_id))
+ return c;
for(size_t i = 0; i != certstores.size(); ++i)
{
- if(const X509_Certificate* cert = certstores[i]->find_cert(issuer_dn, auth_key_id))
- return cert;
+ if(const X509_Certificate* c = certstores[i]->find_cert(issuer_dn, auth_key_id))
+ return c;
}
return nullptr;