projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New functions to retrieve certificate signatures and signature OID NID.
[oweals/openssl.git]
/
crypto
/
x509
/
x509_trs.c
diff --git
a/crypto/x509/x509_trs.c
b/crypto/x509/x509_trs.c
index a6cb9c8b1b37ecac5ebd7eb490669bf48a33e2be..3d7e06815c8e04eee3bc2d50e958ec3a493ce57f 100644
(file)
--- a/
crypto/x509/x509_trs.c
+++ b/
crypto/x509/x509_trs.c
@@
-114,6
+114,15
@@
int X509_check_trust(X509 *x, int id, int flags)
X509_TRUST *pt;
int idx;
if(id == -1) return 1;
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);
idx = X509_TRUST_get_by_id(id);
if(idx == -1) return default_trust(id, x, flags);
pt = X509_TRUST_get0(idx);