Allow intermediate CAs to use RSA PSS in 1.1.0
authorMatt Caswell <matt@openssl.org>
Mon, 23 Apr 2018 08:27:23 +0000 (09:27 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Apr 2018 08:20:05 +0000 (09:20 +0100)
commit5791a917ca0b6273c48fb43a442fd156604065de
treeb39e4db706501941250bfbbd938a5c9ac7ee5f3f
parentc5ed6c553a2efe7abf84ceed5fe38769621a3807
Allow intermediate CAs to use RSA PSS in 1.1.0

In 1.1.0 and above we check the digest algorithm used to create signatures
in intermediate CA certs. If it is not sufficiently strong then we reject
the cert. To work out what digest was used we look at the OID for the
signature. This works for most signatures, but not for RSA PSS where the
digest is stored as parameter of the SignatureAlgorithmIdentifier. This
results in the digest look up routines failing and the cert being rejected.

PR #3301 added support for doing this properly in master. So in that
branch this all works as expected. It also works properly in 1.0.2 where we
don't have the digest checks at all. So the only branch where this fails is
1.1.0.

PR #3301 seems too significant to backport to 1.1.0. Instead we simply skip
the signature digest algorithm strength checks if we detect RSA PSS.

Fixes #3558.

Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/6052)
crypto/x509/x509_vfy.c
ssl/t1_lib.c