X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fx509%2Fx509_trs.c;h=3d7e06815c8e04eee3bc2d50e958ec3a493ce57f;hb=dfcf48f499f19fd17a3aee03151ea301814ea6ec;hp=47d85becd55e67dd066610f978df28f25ed800b4;hpb=c7235be6e36c4bef84594aa3b2f0561db84b63d8;p=oweals%2Fopenssl.git diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c index 47d85becd5..3d7e06815c 100644 --- a/crypto/x509/x509_trs.c +++ b/crypto/x509/x509_trs.c @@ -1,5 +1,5 @@ /* x509_trs.c */ -/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL +/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ /* ==================================================================== @@ -114,6 +114,15 @@ int X509_check_trust(X509 *x, int id, int flags) X509_TRUST *pt; 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); pt = X509_TRUST_get0(idx);