]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix SSL_check_chain()
authorMatt Caswell <matt@openssl.org>
Tue, 23 Jul 2019 14:14:29 +0000 (15:14 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 9 Aug 2019 16:29:39 +0000 (17:29 +0100)
commit5235ef44b93306a14d0b6c695b13c64b16e1fdec
tree4281e6ff271706bf0f5732a981aaf64fe9a14af5
parentdb26ec80873e8faa8d40795120bc15c37d36ac98
Fix SSL_check_chain()

The function SSL_check_chain() can be used by applications to check that
a cert and chain is compatible with the negotiated parameters. This could
be useful (for example) from the certificate callback. Unfortunately this
function was applying TLSv1.2 sig algs rules and did not work correctly if
TLSv1.3 was negotiated.

We refactor tls_choose_sigalg to split it up and create a new function
find_sig_alg which can (optionally) take a certificate and key as
parameters and find an appropriate sig alg if one exists. If the cert and
key are not supplied then we try to find a cert and key from the ones we
have available that matches the shared sig algs.

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/9442)
ssl/t1_lib.c