diff options
author | 2019-03-25 17:21:18 +0000 | |
---|---|---|
committer | 2019-03-25 17:21:18 +0000 | |
commit | 96b13b45524b5752bdf903f51661790288f40746 (patch) | |
tree | d2d95e01a29dad12804e56b06ea8005958cd61ee /lib/libssl/ssl_srvr.c | |
parent | Rework ssl_ctx_use_certificate_chain_bio() to use the CERT_PKEY chain. (diff) | |
download | wireguard-openbsd-96b13b45524b5752bdf903f51661790288f40746.tar.xz wireguard-openbsd-96b13b45524b5752bdf903f51661790288f40746.zip |
Defer sigalgs selection until the certificate is known.
Previously the signature algorithm was selected when the TLS extension was
parsed (or the client received a certificate request), however the actual
certificate to be used is not known at this stage. This leads to various
problems, including the selection of a signature algorithm that cannot be
used with the certificate key size (as found by jeremy@ via ruby regress).
Instead, store the signature algorithms list and only select a signature
algorithm when we're ready to do signature generation.
Joint work with beck@.
Diffstat (limited to 'lib/libssl/ssl_srvr.c')
-rw-r--r-- | lib/libssl/ssl_srvr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_srvr.c b/lib/libssl/ssl_srvr.c index f2aafc30326..745d0228f30 100644 --- a/lib/libssl/ssl_srvr.c +++ b/lib/libssl/ssl_srvr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_srvr.c,v 1.65 2019/03/25 16:35:48 jsing Exp $ */ +/* $OpenBSD: ssl_srvr.c,v 1.66 2019/03/25 17:21:18 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -2177,7 +2177,7 @@ ssl3_get_cert_verify(SSL *s) al = SSL_AD_DECODE_ERROR; goto f_err; } - if (!ssl_sigalg_pkey_ok(sigalg, pkey)) { + if (!ssl_sigalg_pkey_ok(sigalg, pkey, 0)) { SSLerror(s, SSL_R_WRONG_SIGNATURE_TYPE); al = SSL_AD_DECODE_ERROR; goto f_err; |