diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index f42c34b087..c1191b40ed 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_trs.c,v 1.36 2024/01/10 21:11:37 tb Exp $ */ | 1 | /* $OpenBSD: x509_trs.c,v 1.37 2024/01/10 21:14:14 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -66,7 +66,16 @@ | |||
| 66 | 66 | ||
| 67 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); | 67 | static int trust_1oidany(X509_TRUST *trust, X509 *x, int flags); |
| 68 | static int trust_1oid(X509_TRUST *trust, X509 *x, int flags); | 68 | static int trust_1oid(X509_TRUST *trust, X509 *x, int flags); |
| 69 | static int trust_compat(X509_TRUST *trust, X509 *x, int flags); | 69 | |
| 70 | static int | ||
| 71 | trust_compat(X509_TRUST *trust, X509 *x, int flags) | ||
| 72 | { | ||
| 73 | X509_check_purpose(x, -1, 0); | ||
| 74 | if (x->ex_flags & EXFLAG_SS) | ||
| 75 | return X509_TRUST_TRUSTED; | ||
| 76 | else | ||
| 77 | return X509_TRUST_UNTRUSTED; | ||
| 78 | } | ||
| 70 | 79 | ||
| 71 | static int | 80 | static int |
| 72 | obj_trust(int id, X509 *x, int flags) | 81 | obj_trust(int id, X509 *x, int flags) |
| @@ -296,13 +305,3 @@ trust_1oid(X509_TRUST *trust, X509 *x, int flags) | |||
| 296 | return obj_trust(trust->arg1, x, flags); | 305 | return obj_trust(trust->arg1, x, flags); |
| 297 | return X509_TRUST_UNTRUSTED; | 306 | return X509_TRUST_UNTRUSTED; |
| 298 | } | 307 | } |
| 299 | |||
| 300 | static int | ||
| 301 | trust_compat(X509_TRUST *trust, X509 *x, int flags) | ||
| 302 | { | ||
| 303 | X509_check_purpose(x, -1, 0); | ||
| 304 | if (x->ex_flags & EXFLAG_SS) | ||
| 305 | return X509_TRUST_TRUSTED; | ||
| 306 | else | ||
| 307 | return X509_TRUST_UNTRUSTED; | ||
| 308 | } | ||
