aboutsummaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/x509/x509_trs.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/x509/x509_trs.c')
-rw-r--r--deps/openssl/openssl/crypto/x509/x509_trs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/openssl/openssl/crypto/x509/x509_trs.c b/deps/openssl/openssl/crypto/x509/x509_trs.c
index 7e444795a5..11e0763403 100644
--- a/deps/openssl/openssl/crypto/x509/x509_trs.c
+++ b/deps/openssl/openssl/crypto/x509/x509_trs.c
@@ -119,6 +119,14 @@ int X509_check_trust(X509 *x, int id, int flags)
int idx;
if (id == -1)
return 1;
+ /* We get this as a default value */
+ if (id == 0) {
+ int rv;
+ rv = obj_trust(NID_anyExtendedKeyUsage, x, 0);
+ if (rv != X509_TRUST_UNTRUSTED)
+ return rv;
+ return trust_compat(NULL, x, 0);
+ }
idx = X509_TRUST_get_by_id(id);
if (idx == -1)
return default_trust(id, x, flags);