summaryrefslogtreecommitdiff
path: root/drivers/builtin_openssl2/crypto/x509/x509_trs.c
diff options
context:
space:
mode:
authormrezai <mhd.rezai@gmail.com>2016-04-15 19:03:35 +0430
committermrezai <mhd.rezai@gmail.com>2016-04-15 19:03:35 +0430
commite97922f22038e9049ed4c2db5b3736dfaa0edde3 (patch)
tree37e036a343e7482a387b7acd0a88509af78a69eb /drivers/builtin_openssl2/crypto/x509/x509_trs.c
parent880f4abda44a42532abb6f15999a90bc85f6264a (diff)
Update OpenSSL to version 1.0.2g
Diffstat (limited to 'drivers/builtin_openssl2/crypto/x509/x509_trs.c')
-rw-r--r--drivers/builtin_openssl2/crypto/x509/x509_trs.c8
1 files changed, 8 insertions, 0 deletions
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);