Skip to content

Commit

Permalink
x509_trust.c: extend trust_compat to allow for id-alg-noSignature as …
Browse files Browse the repository at this point in the history
…alternative to self-signed
  • Loading branch information
DDvO committed Oct 16, 2024
1 parent 8ad577d commit 7016ebc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crypto/x509/x509_trust.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ static int trust_compat(X509_TRUST *trust, X509 *x, int flags)
/* Call for side-effect of setting EXFLAG_SS for self-signed-certs */
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))
if ((flags & X509_TRUST_NO_SS_COMPAT) == 0
&& ((x->ex_flags & EXFLAG_SS)
|| OBJ_obj2nid(x->sig_alg.algorithm) == NID_id_alg_noSignature))
return X509_TRUST_TRUSTED;
else
return X509_TRUST_UNTRUSTED;
Expand Down

0 comments on commit 7016ebc

Please sign in to comment.