diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_trs.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_trs.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index b075d1b6c8..c4d371446c 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.28 2022/11/14 17:48:50 beck Exp $ */ | 1 | /* $OpenBSD: x509_trs.c,v 1.29 2022/11/17 00:42:12 beck 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 | */ |
| @@ -111,8 +111,8 @@ int | |||
| 111 | } | 111 | } |
| 112 | LCRYPTO_ALIAS(X509_TRUST_set_default) | 112 | LCRYPTO_ALIAS(X509_TRUST_set_default) |
| 113 | 113 | ||
| 114 | static int | 114 | int |
| 115 | X509_check_trust_internal(X509 *x, int id, int flags, int compat) | 115 | X509_check_trust(X509 *x, int id, int flags) |
| 116 | { | 116 | { |
| 117 | X509_TRUST *pt; | 117 | X509_TRUST *pt; |
| 118 | int idx; | 118 | int idx; |
| @@ -133,7 +133,7 @@ X509_check_trust_internal(X509 *x, int id, int flags, int compat) | |||
| 133 | rv = obj_trust(NID_anyExtendedKeyUsage, x, 0); | 133 | rv = obj_trust(NID_anyExtendedKeyUsage, x, 0); |
| 134 | if (rv != X509_TRUST_UNTRUSTED) | 134 | if (rv != X509_TRUST_UNTRUSTED) |
| 135 | return rv; | 135 | return rv; |
| 136 | return compat && trust_compat(NULL, x, 0); | 136 | return trust_compat(NULL, x, 0); |
| 137 | } | 137 | } |
| 138 | idx = X509_TRUST_get_by_id(id); | 138 | idx = X509_TRUST_get_by_id(id); |
| 139 | if (idx == -1) | 139 | if (idx == -1) |
| @@ -144,18 +144,6 @@ X509_check_trust_internal(X509 *x, int id, int flags, int compat) | |||
| 144 | LCRYPTO_ALIAS(X509_check_trust) | 144 | LCRYPTO_ALIAS(X509_check_trust) |
| 145 | 145 | ||
| 146 | int | 146 | int |
| 147 | X509_check_trust(X509 *x, int id, int flags) | ||
| 148 | { | ||
| 149 | return X509_check_trust_internal(x, id, flags, /*compat =*/1); | ||
| 150 | } | ||
| 151 | |||
| 152 | int | ||
| 153 | x509_check_trust_no_compat(X509 *x, int id, int flags) | ||
| 154 | { | ||
| 155 | return X509_check_trust_internal(x, id, flags, /*compat =*/0); | ||
| 156 | } | ||
| 157 | |||
| 158 | int | ||
| 159 | X509_TRUST_get_count(void) | 147 | X509_TRUST_get_count(void) |
| 160 | { | 148 | { |
| 161 | if (!trtable) | 149 | if (!trtable) |
