diff options
| author | jsing <> | 2021-02-20 08:11:57 +0000 |
|---|---|---|
| committer | jsing <> | 2021-02-20 08:11:57 +0000 |
| commit | 76d8640e29e5c039ce8cf94023e9af82f456d36f (patch) | |
| tree | 231a27ddb01199aab95f9603c903c58dd32c6fbb | |
| parent | c704e95c541e2f635d3989f459f4619bd93416b4 (diff) | |
| download | openbsd-76d8640e29e5c039ce8cf94023e9af82f456d36f.tar.gz openbsd-76d8640e29e5c039ce8cf94023e9af82f456d36f.tar.bz2 openbsd-76d8640e29e5c039ce8cf94023e9af82f456d36f.zip | |
Add various public DTLS related defines.
These are currently guarded by LIBRESSL_HAS_DTLS1_2 and LIBRESSL_INTERNAL.
ok tb@
| -rw-r--r-- | src/lib/libssl/dtls1.h | 6 | ||||
| -rw-r--r-- | src/lib/libssl/ssl.h | 10 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/libssl/dtls1.h b/src/lib/libssl/dtls1.h index 1ed7c2dc30..b822f659ab 100644 --- a/src/lib/libssl/dtls1.h +++ b/src/lib/libssl/dtls1.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dtls1.h,v 1.23 2020/03/12 17:01:53 jsing Exp $ */ | 1 | /* $OpenBSD: dtls1.h,v 1.24 2021/02/20 08:11:57 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -74,6 +74,10 @@ extern "C" { | |||
| 74 | #endif | 74 | #endif |
| 75 | 75 | ||
| 76 | #define DTLS1_VERSION 0xFEFF | 76 | #define DTLS1_VERSION 0xFEFF |
| 77 | #if defined(LIBRESSL_HAS_DTLS1_2) || defined(LIBRESSL_INTERNAL) | ||
| 78 | #define DTLS1_2_VERSION 0xFEFD | ||
| 79 | #define DTLS1_VERSION_MAJOR 0xFE | ||
| 80 | #endif | ||
| 77 | 81 | ||
| 78 | /* lengths of messages */ | 82 | /* lengths of messages */ |
| 79 | #define DTLS1_COOKIE_LENGTH 256 | 83 | #define DTLS1_COOKIE_LENGTH 256 |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 425ba50c14..ec9544acc5 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl.h,v 1.180 2021/01/26 18:43:41 tb Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.181 2021/02/20 08:11:57 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 | * |
| @@ -301,6 +301,9 @@ extern "C" { | |||
| 301 | #define SSL_TXT_STREEBOG512 "STREEBOG512" | 301 | #define SSL_TXT_STREEBOG512 "STREEBOG512" |
| 302 | 302 | ||
| 303 | #define SSL_TXT_DTLS1 "DTLSv1" | 303 | #define SSL_TXT_DTLS1 "DTLSv1" |
| 304 | #if defined(LIBRESSL_HAS_DTLS1_2) || defined(LIBRESSL_INTERNAL) | ||
| 305 | #define SSL_TXT_DTLS1_2 "DTLSv1.2" | ||
| 306 | #endif | ||
| 304 | #define SSL_TXT_SSLV2 "SSLv2" | 307 | #define SSL_TXT_SSLV2 "SSLv2" |
| 305 | #define SSL_TXT_SSLV3 "SSLv3" | 308 | #define SSL_TXT_SSLV3 "SSLv3" |
| 306 | #define SSL_TXT_TLSV1 "TLSv1" | 309 | #define SSL_TXT_TLSV1 "TLSv1" |
| @@ -520,6 +523,11 @@ struct ssl_session_st { | |||
| 520 | #define SSL_OP_NO_TLSv1_3 0x20000000L | 523 | #define SSL_OP_NO_TLSv1_3 0x20000000L |
| 521 | #endif | 524 | #endif |
| 522 | 525 | ||
| 526 | #if defined(LIBRESSL_HAS_DTLS1_2) || defined(LIBRESSL_INTERNAL) | ||
| 527 | #define SSL_OP_NO_DTLSv1 0x40000000L | ||
| 528 | #define SSL_OP_NO_DTLSv1_2 0x80000000L | ||
| 529 | #endif | ||
| 530 | |||
| 523 | /* SSL_OP_ALL: various bug workarounds that should be rather harmless. */ | 531 | /* SSL_OP_ALL: various bug workarounds that should be rather harmless. */ |
| 524 | #define SSL_OP_ALL \ | 532 | #define SSL_OP_ALL \ |
| 525 | (SSL_OP_LEGACY_SERVER_CONNECT) | 533 | (SSL_OP_LEGACY_SERVER_CONNECT) |
