Lines Matching refs: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 if (!cert_handle)
108 ScopedCFTypeRef<CFDataRef> der_data(SecCertificateCopyData(cert_handle));
140 OSCertHandle cert_handle = SecCertificateCreateWithData(NULL, cert_data);
141 if (!cert_handle)
143 if (!IsValidOSCertHandle(cert_handle)) {
144 CFRelease(cert_handle);
147 return cert_handle;
167 void X509Certificate::FreeOSCertHandle(OSCertHandle cert_handle) {
168 if (cert_handle)
169 CFRelease(cert_handle);
218 bool X509Certificate::WriteOSCertHandleToPickle(OSCertHandle cert_handle,
220 ScopedCFTypeRef<CFDataRef> cert_data(SecCertificateCopyData(cert_handle));
230 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
233 x509_util_ios::NSSCertificate nss_cert(cert_handle);
234 x509_util::GetPublicKeyInfo(nss_cert.cert_handle(), size_bits, type);