diff options
author | job <> | 2023-02-23 18:12:32 +0000 |
---|---|---|
committer | job <> | 2023-02-23 18:12:32 +0000 |
commit | a08222b8bebdd9bb3795304dce3e988df2c7595c (patch) | |
tree | a66ebeded65ea7f94fc6820531700d59a0ed41b5 /src/lib/libcrypto/x509/x509_set.c | |
parent | 8f4cd3e0e032f13354ee58ce3544243dfb8b9553 (diff) | |
download | openbsd-a08222b8bebdd9bb3795304dce3e988df2c7595c.tar.gz openbsd-a08222b8bebdd9bb3795304dce3e988df2c7595c.tar.bz2 openbsd-a08222b8bebdd9bb3795304dce3e988df2c7595c.zip |
Introduce X509_get0_uids() accessor function
By introducing X509_get0_uids(), one can add RPKI profile compliance
checks to conform the absence of the issuerUID and subjectUID.
OK tb@ jsing@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_set.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_set.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c index e65ffb3b4d..19e0f2b55f 100644 --- a/src/lib/libcrypto/x509/x509_set.c +++ b/src/lib/libcrypto/x509/x509_set.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_set.c,v 1.23 2023/02/16 08:38:17 tb Exp $ */ | 1 | /* $OpenBSD: x509_set.c,v 1.24 2023/02/23 18:12:32 job Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -242,3 +242,14 @@ X509_get_X509_PUBKEY(const X509 *x) | |||
242 | return x->cert_info->key; | 242 | return x->cert_info->key; |
243 | } | 243 | } |
244 | LCRYPTO_ALIAS(X509_get_X509_PUBKEY); | 244 | LCRYPTO_ALIAS(X509_get_X509_PUBKEY); |
245 | |||
246 | void | ||
247 | X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid, | ||
248 | const ASN1_BIT_STRING **psuid) | ||
249 | { | ||
250 | if (piuid != NULL) | ||
251 | *piuid = x->cert_info->issuerUID; | ||
252 | if (psuid != NULL) | ||
253 | *psuid = x->cert_info->subjectUID; | ||
254 | } | ||
255 | LCRYPTO_ALIAS(X509_get0_uids); | ||