summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2018-11-07 01:53:37 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2018-11-07 01:53:37 +0000
commitfe3c5a21fe9b31e50b1be12a0641448fe19283bc (patch)
treef868c076f90480089cb851336ad5a221b2acc657 /lib/libssl/s3_lib.c
parentaacef90d63834a0602bf1dc9c729cdb8a2e05c53 (diff)
Add TLSv1.3 cipher suites (with appropriate guards).
ok beck@ tb@
Diffstat (limited to 'lib/libssl/s3_lib.c')
-rw-r--r--lib/libssl/s3_lib.c56
1 files changed, 55 insertions, 1 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index 1c605613e8a..6ca08774b0c 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.173 2018/11/05 20:41:30 jsing Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.174 2018/11/07 01:53:36 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -870,6 +870,60 @@ SSL_CIPHER ssl3_ciphers[] = {
},
#endif /* OPENSSL_NO_CAMELLIA */
+ /*
+ * TLSv1.3 cipher suites.
+ */
+
+#ifdef LIBRESSL_HAS_TLS1_3
+ /* Cipher 1301 */
+ {
+ .valid = 1,
+ .name = TLS1_3_TXT_AES_128_GCM_SHA256,
+ .id = TLS1_3_CK_AES_128_GCM_SHA256,
+ .algorithm_mkey = SSL_kTLS1_3,
+ .algorithm_auth = SSL_aTLS1_3,
+ .algorithm_enc = SSL_AES128GCM,
+ .algorithm_mac = SSL_AEAD,
+ .algorithm_ssl = SSL_TLSV1_3,
+ .algo_strength = SSL_HIGH,
+ .algorithm2 = SSL_HANDSHAKE_MAC_SHA256, /* XXX */
+ .strength_bits = 128,
+ .alg_bits = 128,
+ },
+
+ /* Cipher 1302 */
+ {
+ .valid = 1,
+ .name = TLS1_3_TXT_AES_256_GCM_SHA384,
+ .id = TLS1_3_CK_AES_256_GCM_SHA384,
+ .algorithm_mkey = SSL_kTLS1_3,
+ .algorithm_auth = SSL_aTLS1_3,
+ .algorithm_enc = SSL_AES256GCM,
+ .algorithm_mac = SSL_AEAD,
+ .algorithm_ssl = SSL_TLSV1_3,
+ .algo_strength = SSL_HIGH,
+ .algorithm2 = SSL_HANDSHAKE_MAC_SHA384, /* XXX */
+ .strength_bits = 256,
+ .alg_bits = 256,
+ },
+
+ /* Cipher 1303 */
+ {
+ .valid = 1,
+ .name = TLS1_3_TXT_CHACHA20_POLY1305_SHA256,
+ .id = TLS1_3_CK_CHACHA20_POLY1305_SHA256,
+ .algorithm_mkey = SSL_kTLS1_3,
+ .algorithm_auth = SSL_aTLS1_3,
+ .algorithm_enc = SSL_CHACHA20POLY1305,
+ .algorithm_mac = SSL_AEAD,
+ .algorithm_ssl = SSL_TLSV1_3,
+ .algo_strength = SSL_HIGH,
+ .algorithm2 = SSL_HANDSHAKE_MAC_SHA256, /* XXX */
+ .strength_bits = 256,
+ .alg_bits = 256,
+ },
+#endif
+
/* Cipher C006 */
{
.valid = 1,