diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-06 12:14:30 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-04-16 14:19:52 +0100 |
commit | 465f34ed27d54b36b47f98b8ce4b5ec9e33c4f02 (patch) | |
tree | 6c6ed230a1ee5ee92d63e18ef0783d19d0e8ed19 /crypto/x509/v3_purp.c | |
parent | 0820217441b68724d91b7644f3560e15149a1848 (diff) |
Introduce an internal version of X509_check_issued()
The internal version is library context aware.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11507)
Diffstat (limited to 'crypto/x509/v3_purp.c')
-rw-r--r-- | crypto/x509/v3_purp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/x509/v3_purp.c b/crypto/x509/v3_purp.c index bee8210bfc..687d065303 100644 --- a/crypto/x509/v3_purp.c +++ b/crypto/x509/v3_purp.c @@ -811,14 +811,15 @@ static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca) * codes for X509_verify_cert() */ -int X509_check_issued(X509 *issuer, X509 *subject) +int x509_check_issued_int(X509 *issuer, X509 *subject, OPENSSL_CTX *libctx, + const char *propq) { if (X509_NAME_cmp(X509_get_subject_name(issuer), X509_get_issuer_name(subject))) return X509_V_ERR_SUBJECT_ISSUER_MISMATCH; - if (!X509v3_cache_extensions(issuer, NULL, NULL) - || !X509v3_cache_extensions(subject, NULL, NULL)) + if (!X509v3_cache_extensions(issuer, libctx, propq) + || !X509v3_cache_extensions(subject, libctx, propq)) return X509_V_ERR_UNSPECIFIED; if (subject->akid) { @@ -853,6 +854,11 @@ int X509_check_issued(X509 *issuer, X509 *subject) return X509_V_OK; } +int X509_check_issued(X509 *issuer, X509 *subject) +{ + return x509_check_issued_int(issuer, subject, NULL, NULL); +} + int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid) { |