summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2018-11-07 01:53:36 +0000
committerjsing <jsing@openbsd.org>2018-11-07 01:53:36 +0000
commitd3b2bb0df303751bea51842b28c871abcbcb1034 (patch)
tree700ba67953eb969a9e2663fd7e643feb845abe47 /lib/libssl/ssl_lib.c
parent+interop (diff)
downloadwireguard-openbsd-d3b2bb0df303751bea51842b28c871abcbcb1034.tar.xz
wireguard-openbsd-d3b2bb0df303751bea51842b28c871abcbcb1034.zip
Add TLSv1.3 cipher suites (with appropriate guards).
ok beck@ tb@
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r--lib/libssl/ssl_lib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index d8415bcf6d8..3c4d1169194 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.189 2018/09/05 16:58:59 jsing Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.190 2018/11/07 01:53:36 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1424,6 +1424,11 @@ ssl_cipher_list_to_bytes(SSL *s, STACK_OF(SSL_CIPHER) *ciphers, CBB *cbb)
if ((cipher = sk_SSL_CIPHER_value(ciphers, i)) == NULL)
return 0;
+ /* Skip TLS v1.3 only ciphersuites if lower than v1.3 */
+ if ((cipher->algorithm_ssl & SSL_TLSV1_3) &&
+ (TLS1_get_client_version(s) < TLS1_3_VERSION))
+ continue;
+
/* Skip TLS v1.2 only ciphersuites if lower than v1.2 */
if ((cipher->algorithm_ssl & SSL_TLSV1_2) &&
(TLS1_get_client_version(s) < TLS1_2_VERSION))