Index: net/cert/cert_verify_proc_nss.cc |
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc |
index 27558f79d36a4a73e1010cf975d53357b083e47f..1347dc41413cf2cf544b0378c5b6c6ac6b17abd5 100644 |
--- a/net/cert/cert_verify_proc_nss.cc |
+++ b/net/cert/cert_verify_proc_nss.cc |
@@ -195,8 +195,13 @@ void GetCertChainInfo(CERTCertList* cert_list, |
if (root_cert) |
verified_chain.push_back(root_cert); |
- verify_result->verified_cert = |
+ |
+ scoped_refptr<X509Certificate> verified_cert_with_chain = |
X509Certificate::CreateFromHandle(verified_cert, verified_chain); |
+ if (verified_cert_with_chain) |
+ verify_result->verified_cert = std::move(verified_cert_with_chain); |
+ else |
+ verify_result->cert_status |= CERT_STATUS_INVALID; |
} |
// IsKnownRoot returns true if the given certificate is one that we believe |