diff options
author | jsing <> | 2020-01-22 01:21:43 +0000 |
---|---|---|
committer | jsing <> | 2020-01-22 01:21:43 +0000 |
commit | 33e8d2d1da86ec2fec46397361af862802b89333 (patch) | |
tree | 57cea55ebca0c29b9c1f68035245c609e56c6cee /src | |
parent | d2535f6d6c56956061dc8da2a8a2bfdd6b98a0a4 (diff) | |
download | openbsd-33e8d2d1da86ec2fec46397361af862802b89333.tar.gz openbsd-33e8d2d1da86ec2fec46397361af862802b89333.tar.bz2 openbsd-33e8d2d1da86ec2fec46397361af862802b89333.zip |
Split the TLSv1.3 guards into separate client and server guards.
ok beck@ tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/Makefile | 5 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 8 | ||||
-rw-r--r-- | src/lib/libssl/ssl_methods.c | 6 |
3 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile index e3b9a5cac9..b30fcca9eb 100644 --- a/src/lib/libssl/Makefile +++ b/src/lib/libssl/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.58 2020/01/20 13:10:37 jsing Exp $ | 1 | # $OpenBSD: Makefile,v 1.59 2020/01/22 01:21:43 jsing Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | .ifndef NOMAN | 4 | .ifndef NOMAN |
@@ -17,7 +17,8 @@ CFLAGS+= -Werror | |||
17 | .endif | 17 | .endif |
18 | CFLAGS+= -DLIBRESSL_INTERNAL | 18 | CFLAGS+= -DLIBRESSL_INTERNAL |
19 | .ifdef TLS1_3 | 19 | .ifdef TLS1_3 |
20 | CFLAGS+= -DLIBRESSL_HAS_TLS1_3 | 20 | CFLAGS+= -DLIBRESSL_HAS_TLS1_3_CLIENT |
21 | CFLAGS+= -DLIBRESSL_HAS_TLS1_3_SERVER | ||
21 | .endif | 22 | .endif |
22 | CFLAGS+= -I${.CURDIR} | 23 | CFLAGS+= -I${.CURDIR} |
23 | 24 | ||
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 8ac05ca70f..012556fa71 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.168 2020/01/21 05:19:02 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.169 2020/01/22 01:21:43 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -167,6 +167,12 @@ | |||
167 | extern "C" { | 167 | extern "C" { |
168 | #endif | 168 | #endif |
169 | 169 | ||
170 | #if defined(LIBRESSL_HAS_TLS1_3_CLIENT) || defined(LIBRESSL_HAS_TLS1_3_SERVER) | ||
171 | #define LIBRESSL_HAS_TLS1_3 1 | ||
172 | #else | ||
173 | #define LIBRESSL_HAS_TLS1_3 0 | ||
174 | #endif | ||
175 | |||
170 | /* SSLeay version number for ASN.1 encoding of the session information */ | 176 | /* SSLeay version number for ASN.1 encoding of the session information */ |
171 | /* Version 0 - initial version | 177 | /* Version 0 - initial version |
172 | * Version 1 - added the optional peer certificate | 178 | * Version 1 - added the optional peer certificate |
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c index 5a62a7adc4..33d2d7654d 100644 --- a/src/lib/libssl/ssl_methods.c +++ b/src/lib/libssl/ssl_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_methods.c,v 1.5 2019/11/17 19:07:07 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_methods.c,v 1.6 2020/01/22 01:21:43 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -211,7 +211,7 @@ dtls1_get_server_method(int ver) | |||
211 | return (NULL); | 211 | return (NULL); |
212 | } | 212 | } |
213 | 213 | ||
214 | #ifdef LIBRESSL_HAS_TLS1_3 | 214 | #ifdef LIBRESSL_HAS_TLS1_3_CLIENT |
215 | static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { | 215 | static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { |
216 | .version = TLS1_3_VERSION, | 216 | .version = TLS1_3_VERSION, |
217 | .min_version = TLS1_VERSION, | 217 | .min_version = TLS1_VERSION, |
@@ -384,7 +384,7 @@ SSLv23_client_method(void) | |||
384 | const SSL_METHOD * | 384 | const SSL_METHOD * |
385 | TLS_client_method(void) | 385 | TLS_client_method(void) |
386 | { | 386 | { |
387 | #ifdef LIBRESSL_HAS_TLS1_3 | 387 | #ifdef LIBRESSL_HAS_TLS1_3_CLIENT |
388 | return (&TLS_client_method_data); | 388 | return (&TLS_client_method_data); |
389 | #else | 389 | #else |
390 | return tls_legacy_client_method(); | 390 | return tls_legacy_client_method(); |