aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_trs.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2020-03-31 15:25:23 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2020-03-31 15:25:23 +0000
commitb6cfecdc04a5a5e42ae4f2b025d8246cc16f3342 (patch)
tree2a7386571f7a820ff0830927575980b68bb350c7 /crypto/x509/x509_trs.c
parentaa144ced5d61b5c7fb74acaebb37d85bd08f0416 (diff)
downloadsrc-b6cfecdc04a5a5e42ae4f2b025d8246cc16f3342.tar.gz
src-b6cfecdc04a5a5e42ae4f2b025d8246cc16f3342.zip
Import OpenSSL 1.1.1f.vendor/openssl/1.1.1f
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=359482 svn path=/vendor-crypto/openssl/1.1.1f/; revision=359483; tag=vendor/openssl/1.1.1f
Diffstat (limited to 'crypto/x509/x509_trs.c')
-rw-r--r--crypto/x509/x509_trs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/x509/x509_trs.c b/crypto/x509/x509_trs.c
index 9e199d63e46a..a10d437735b8 100644
--- a/crypto/x509/x509_trs.c
+++ b/crypto/x509/x509_trs.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -240,8 +240,9 @@ static int trust_1oid(X509_TRUST *trust, X509 *x, int flags)
static int trust_compat(X509_TRUST *trust, X509 *x, int flags)
{
/* Call for side-effect of computing hash and caching extensions */
- X509_check_purpose(x, -1, 0);
- if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && x->ex_flags & EXFLAG_SS)
+ if (X509_check_purpose(x, -1, 0) != 1)
+ return X509_TRUST_UNTRUSTED;
+ if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS))
return X509_TRUST_TRUSTED;
else
return X509_TRUST_UNTRUSTED;