From e97922f22038e9049ed4c2db5b3736dfaa0edde3 Mon Sep 17 00:00:00 2001 From: mrezai Date: Fri, 15 Apr 2016 19:03:35 +0430 Subject: Update OpenSSL to version 1.0.2g --- drivers/builtin_openssl2/crypto/x509/x509_trs.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/builtin_openssl2/crypto/x509/x509_trs.c') diff --git a/drivers/builtin_openssl2/crypto/x509/x509_trs.c b/drivers/builtin_openssl2/crypto/x509/x509_trs.c index 7e444795a5..11e0763403 100644 --- a/drivers/builtin_openssl2/crypto/x509/x509_trs.c +++ b/drivers/builtin_openssl2/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); -- cgit v1.2.3