Lines Matching refs:cert
7 #include <cert.h>
67 if (p->value.pointer.cert) {
68 CERT_DestroyCertificate(p->value.pointer.cert);
69 p->value.pointer.cert = NULL;
129 // Map PORT_GetError() return values to our cert status flags.
184 SECAlgorithmID& signature = node->cert->signature;
580 LOG(ERROR) << "Cert has no policies extension or extension couldn't be "
614 SHA1Fingerprint CertPublicKeyHash(CERTCertificate* cert) {
617 cert->derPublicKey.data, cert->derPublicKey.len);
628 hashes->push_back(CertPublicKeyHash(node->cert));
685 CERTCertificate* cert = CERT_CreateCertificate(serial_number, subject_name,
687 if (!cert) {
692 // Cleanup for resources used to generate the cert.
697 // Sign the cert here. The logic of this method references SignCert() in NSS
700 // |arena| is used to encode the cert.
701 PRArenaPool* arena = cert->arena;
705 CERT_DestroyCertificate(cert);
709 SECStatus rv = SECOID_SetAlgorithmID(arena, &cert->signature, algo_id, 0);
711 CERT_DestroyCertificate(cert);
715 // Generate a cert of version 3.
716 *(cert->version.data) = 2;
717 cert->version.len = 1;
723 // Use ASN1 DER to encode the cert.
725 arena, &der, cert, SEC_ASN1_GET(CERT_CertificateTemplate));
727 CERT_DestroyCertificate(cert);
731 // Allocate space to contain the signed cert.
734 CERT_DestroyCertificate(cert);
738 // Sign the ASN1 encoded cert and save it to |result|.
741 CERT_DestroyCertificate(cert);
745 // Save the signed result to the cert.
746 cert->derCert = *result;
749 CreateFromHandle(cert, SOURCE_LONE_CERT_IMPORT, OSCertHandles());
750 CERT_DestroyCertificate(cert);
774 // Make sure that the hostname matches with the common name of the cert.
779 // Make sure that the cert is valid now.
792 cvout[cvout_index].value.pointer.cert = NULL;
830 cvout[cvout_trust_anchor_index].value.pointer.cert,
834 IsKnownRoot(cvout[cvout_trust_anchor_index].value.pointer.cert);
855 // anchor. If the trust anchor has no EV policy, we know the cert isn't EV.
864 cvout[cvout_index].value.pointer.cert = NULL;
879 cvout[cvout_trust_anchor_index].value.pointer.cert;
984 OSCertHandle cert) {
988 DCHECK(NULL != cert->derCert.data);
989 DCHECK(0 != cert->derCert.len);
992 cert->derCert.data, cert->derCert.len);