Skip to content

Commit

Permalink
update master-with-bazel from master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
BoringSSL Robot committed Aug 21, 2020
2 parents 0d34ecd + 48cb69f commit 8d5a33f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/crypto/x509/x509_set.c
Expand Up @@ -193,6 +193,17 @@ ASN1_TIME *X509_get_notAfter(const X509 *x509)
return x509->cert_info->validity->notAfter;
}

void X509_get0_uids(const X509 *x509, const ASN1_BIT_STRING **out_issuer_uid,
const ASN1_BIT_STRING **out_subject_uid)
{
if (out_issuer_uid != NULL) {
*out_issuer_uid = x509->cert_info->issuerUID;
}
if (out_subject_uid != NULL) {
*out_subject_uid = x509->cert_info->subjectUID;
}
}

int X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
{
if ((x == NULL) || (x->cert_info == NULL))
Expand Down
7 changes: 7 additions & 0 deletions src/include/openssl/x509.h
Expand Up @@ -516,6 +516,13 @@ OPENSSL_EXPORT ASN1_TIME *X509_get_notAfter(const X509 *x509);
#define X509_set_notBefore X509_set1_notBefore
#define X509_set_notAfter X509_set1_notAfter

// X509_get0_uids sets |*out_issuer_uid| and |*out_subject_uid| to non-owning
// pointers to the issuerUID and subjectUID fields, respectively, of |x509|.
// Either output pointer may be NULL to skip the field.
OPENSSL_EXPORT void X509_get0_uids(const X509 *x509,
const ASN1_BIT_STRING **out_issuer_uid,
const ASN1_BIT_STRING **out_subject_uid);

// X509_get_cert_info returns |x509|'s TBSCertificate structure. Note this
// function is not const-correct for legacy reasons.
//
Expand Down

0 comments on commit 8d5a33f

Please sign in to comment.