Lines Matching defs:cert
59 * Finds the index of the first extension with the given NID in cert.
63 static int ct_x509_get_ext(X509 *cert, int nid, int *is_duplicated)
65 int ret = X509_get_ext_by_NID(cert, nid, -1);
68 *is_duplicated = ret >= 0 && X509_get_ext_by_NID(cert, nid, ret) >= 0;
78 __owur static int ct_x509_cert_fixup(X509 *cert, X509 *presigner)
88 certidx = ct_x509_get_ext(cert, NID_authority_key_identifier,
103 if (!X509_set_issuer_name(cert, X509_get_issuer_name(presigner)))
108 X509_EXTENSION *certext = X509_get_ext(cert, certidx);
122 int SCT_CTX_set1_cert(SCT_CTX *sctx, X509 *cert, X509 *presigner)
129 int poison_idx = ct_x509_get_ext(cert, NID_ct_precert_poison, &poison_ext_is_dup);
135 /* If *cert doesn't have a poison extension, it isn't a precert */
137 /* cert isn't a precert, so we shouldn't have a presigner */
141 certderlen = i2d_X509(cert, &certder);
146 /* See if cert has a precert SCTs extension */
147 idx = ct_x509_get_ext(cert, NID_ct_precert_scts, &sct_ext_is_dup);
154 * cert can't both contain SCTs (i.e. have an SCT extension) and be a
166 * cert. This, along with ct_x509_cert_fixup(), gets a TBSCertificate (see
167 * RFC5280) from cert, which is what the CT log signed when it produced the
172 pretmp = X509_dup(cert);