just mark sig algs as weak instead of expiration date
This commit is contained in:
@@ -2353,20 +2353,12 @@ hx509_verify_path(hx509_context context,
|
||||
goto out;
|
||||
}
|
||||
/*
|
||||
* Verify that the sigature algorithm "best-before" date is
|
||||
* before the creation date of the certificate, do this for
|
||||
* trust anchors too, since any trust anchor that is created
|
||||
* after a algorithm is known to be bad deserved to be invalid.
|
||||
*
|
||||
* Skip the leaf certificate for now...
|
||||
* Verify that the sigature algorithm is not weak. Ignore
|
||||
* trust anchors since they are provisioned by the user.
|
||||
*/
|
||||
|
||||
if (i != 0 && (ctx->flags & HX509_VERIFY_CTX_F_NO_BEST_BEFORE_CHECK) == 0) {
|
||||
time_t notBefore =
|
||||
_hx509_Time2time_t(&c->tbsCertificate.validity.notBefore);
|
||||
ret = _hx509_signature_best_before(context,
|
||||
&c->signatureAlgorithm,
|
||||
notBefore);
|
||||
if (i + 1 != path.len && (ctx->flags & HX509_VERIFY_CTX_F_NO_BEST_BEFORE_CHECK) == 0) {
|
||||
ret = _hx509_signature_is_weak(context, &c->signatureAlgorithm);
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
|
Reference in New Issue
Block a user