diff options
author | 2019-01-23 16:46:04 +0000 | |
---|---|---|
committer | 2019-01-23 16:46:04 +0000 | |
commit | fbffb3299c3edc0e008406dc9acac58f5594204c (patch) | |
tree | e88678280031c95538552db5cee544d347c93e36 /lib/libssl/ssl_sigalgs.c | |
parent | Remove uneeded header. (diff) | |
download | wireguard-openbsd-fbffb3299c3edc0e008406dc9acac58f5594204c.tar.xz wireguard-openbsd-fbffb3299c3edc0e008406dc9acac58f5594204c.zip |
Modify sigalgs extension processing for TLS 1.3.
- Make a separate sigalgs list for TLS 1.3 including only modern
algorithm choices which we use when the handshake will not negotiate
TLS 1.2
- Modify the legacy sigalgs for TLS 1.2 to include the RSA PSS algorithms as
mandated by RFC8446 when the handshake will permit negotiation of TLS 1.2
ok jsing@ tb@
Diffstat (limited to 'lib/libssl/ssl_sigalgs.c')
-rw-r--r-- | lib/libssl/ssl_sigalgs.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lib/libssl/ssl_sigalgs.c b/lib/libssl/ssl_sigalgs.c index a6b4251d70d..23f65f5070c 100644 --- a/lib/libssl/ssl_sigalgs.c +++ b/lib/libssl/ssl_sigalgs.c @@ -1,6 +1,6 @@ -/* $OpenBSD: ssl_sigalgs.c,v 1.11 2018/11/16 02:41:16 beck Exp $ */ +/* $OpenBSD: ssl_sigalgs.c,v 1.12 2019/01/23 16:46:04 beck Exp $ */ /* - * Copyright (c) 2018, Bob Beck <beck@openbsd.org> + * Copyright (c) 2018-2019 Bob Beck <beck@openbsd.org> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -163,13 +163,30 @@ const struct ssl_sigalg sigalgs[] = { }, }; +/* Sigalgs for tls 1.3, in preference order, */ +uint16_t tls13_sigalgs[] = { + SIGALG_RSA_PSS_RSAE_SHA512, + SIGALG_RSA_PKCS1_SHA512, + SIGALG_ECDSA_SECP512R1_SHA512, + SIGALG_RSA_PSS_RSAE_SHA384, + SIGALG_RSA_PKCS1_SHA384, + SIGALG_ECDSA_SECP384R1_SHA384, + SIGALG_RSA_PSS_RSAE_SHA256, + SIGALG_RSA_PKCS1_SHA256, + SIGALG_ECDSA_SECP256R1_SHA256, +}; +size_t tls13_sigalgs_len = (sizeof(tls13_sigalgs) / sizeof(tls13_sigalgs[0])); + /* Sigalgs for tls 1.2, in preference order, */ uint16_t tls12_sigalgs[] = { + SIGALG_RSA_PSS_RSAE_SHA512, SIGALG_RSA_PKCS1_SHA512, SIGALG_ECDSA_SECP512R1_SHA512, SIGALG_GOSTR12_512_STREEBOG_512, + SIGALG_RSA_PSS_RSAE_SHA384, SIGALG_RSA_PKCS1_SHA384, SIGALG_ECDSA_SECP384R1_SHA384, + SIGALG_RSA_PSS_RSAE_SHA256, SIGALG_RSA_PKCS1_SHA256, SIGALG_ECDSA_SECP256R1_SHA256, SIGALG_GOSTR12_256_STREEBOG_256, |