Lines Matching defs:cert_handle
43 // Returns true if a given |cert_handle| is actually a valid X.509 certificate
52 bool IsValidOSCertHandle(SecCertificateRef cert_handle) {
54 SecCertificateCopySubjectSummary(cert_handle));
61 CERTCertificate* cert_handle = nss_cert.cert_handle();
62 if (cert_handle) {
63 x509_util::ParsePrincipal(&cert_handle->subject, &subject_);
64 x509_util::ParsePrincipal(&cert_handle->issuer, &issuer_);
65 x509_util::ParseDate(&cert_handle->validity.notBefore, &valid_start_);
66 x509_util::ParseDate(&cert_handle->validity.notAfter, &valid_expiry_);
67 serial_number_ = x509_util::ParseSerialNumber(cert_handle);
92 CERTCertificate* cert_handle = nss_cert.cert_handle();
93 if (!cert_handle) {
100 x509_util::GetSubjectAltName(cert_handle, dns_names, ip_addrs);
104 bool X509Certificate::GetDEREncoded(OSCertHandle cert_handle,
106 ScopedCFTypeRef<CFDataRef> der_data(SecCertificateCopyData(cert_handle));
138 OSCertHandle cert_handle = SecCertificateCreateWithData(NULL, cert_data);
139 if (!cert_handle)
141 if (!IsValidOSCertHandle(cert_handle)) {
142 CFRelease(cert_handle);
145 return cert_handle;
165 void X509Certificate::FreeOSCertHandle(OSCertHandle cert_handle) {
166 CFRelease(cert_handle);
215 bool X509Certificate::WriteOSCertHandleToPickle(OSCertHandle cert_handle,
217 ScopedCFTypeRef<CFDataRef> cert_data(SecCertificateCopyData(cert_handle));
227 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
230 x509_util_ios::NSSCertificate nss_cert(cert_handle);
231 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type);