Provide a ssl_sigalg_for_peer() function and use in the TLSv1.3 code.
authorjsing <jsing@openbsd.org>
Tue, 29 Jun 2021 19:20:39 +0000 (19:20 +0000)
committerjsing <jsing@openbsd.org>
Tue, 29 Jun 2021 19:20:39 +0000 (19:20 +0000)
commit21424b10c13566402f495607795cb61f7f60bf28
tree6b24926ea932f32531030cd7596bf4dbd3bc1aee
parent9bba4ac007f30de700f3ce64cb74f9eb55b76e07
Provide a ssl_sigalg_for_peer() function and use in the TLSv1.3 code.

Provide an ssl_sigalg_for_peer() function that knows how to figure out
which signature algorithm should be used for a peer provided signature,
performing appropriate validation to ensure that the peer provided value
is suitable for the protocol version and key in use.

In the TLSv1.3 code, this replaces the need for separate calls to lookup
the sigalg from the peer provided value, then perform validation.

ok inoguchi@ tb@
lib/libssl/ssl_sigalgs.c
lib/libssl/ssl_sigalgs.h
lib/libssl/tls13_client.c
lib/libssl/tls13_server.c