Only accept self-signed certs within chains for strong hash types
This commit is contained in:
@@ -1023,9 +1023,12 @@ certificate_is_self_signed(hx509_context context,
|
||||
ret = _hx509_name_cmp(&cert->tbsCertificate.subject,
|
||||
&cert->tbsCertificate.issuer, &diff);
|
||||
*self_signed = (diff == 0);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
hx509_set_error_string(context, 0, ret,
|
||||
"Failed to check if self signed");
|
||||
} else
|
||||
ret = _hx509_self_signed_valid(context, &cert->signatureAlgorithm);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user