summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-07-31 17:02:45 +0200
committerDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>2019-08-01 11:32:12 +0200
commitafdec13dd972592fd01195cd591538848de5403c (patch)
treec8fdc531bbdf74517071f8b2631acd06440eca8a /crypto
parent8b9575ba376ecfac7834102ad0c61fd70aeb8934 (diff)
Add missing accessors for X509 AuthorityKeyIdentifier
Complements commit b383aa208146, which added X509_get0_authority_key_id(). const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x); const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x); [NEW] const ASN1_INTEGER *X509_get0_authority_serial(X509 *x); [NEW] Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9493)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/v3_purp.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/x509/v3_purp.c b/crypto/x509/v3_purp.c
index d0ac7e6ed9..40f976bdda 100644
--- a/crypto/x509/v3_purp.c
+++ b/crypto/x509/v3_purp.c
@@ -890,6 +890,20 @@ const ASN1_OCTET_STRING *X509_get0_authority_key_id(X509 *x)
return (x->akid != NULL ? x->akid->keyid : NULL);
}
+const GENERAL_NAMES *X509_get0_authority_issuer(X509 *x)
+{
+ /* Call for side-effect of computing hash and caching extensions */
+ X509_check_purpose(x, -1, -1);
+ return (x->akid != NULL ? x->akid->issuer : NULL);
+}
+
+const ASN1_INTEGER *X509_get0_authority_serial(X509 *x)
+{
+ /* Call for side-effect of computing hash and caching extensions */
+ X509_check_purpose(x, -1, -1);
+ return (x->akid != NULL ? x->akid->serial : NULL);
+}
+
long X509_get_pathlen(X509 *x)
{
/* Called for side effect of caching extensions */