diff options
author | jsing <> | 2020-01-02 06:23:16 +0000 |
---|---|---|
committer | jsing <> | 2020-01-02 06:23:16 +0000 |
commit | 92c7edc8eaad10f666525c5fb64a55987aaf0a81 (patch) | |
tree | 26462550e7dbd52d9dcb5b6088548dec141cb29d | |
parent | 5b9d515fc489268b7277bcd61a86c815cca416a7 (diff) | |
download | openbsd-92c7edc8eaad10f666525c5fb64a55987aaf0a81.tar.gz openbsd-92c7edc8eaad10f666525c5fb64a55987aaf0a81.tar.bz2 openbsd-92c7edc8eaad10f666525c5fb64a55987aaf0a81.zip |
Provide TLSEXT_TYPE_* aliases for TLS 1.3.
OpenSSL decided to use their own names for two of the TLS 1.3 extensions,
rather than using the names given in the RFC. Provide aliases for these so
that code written to work with OpenSSL also works with LibreSSL (otherwise
everyone gets to provide their own workarounds).
Issue noted by d3x0r on github.
ok inoguchi@ tb@
-rw-r--r-- | src/lib/libssl/tls1.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/libssl/tls1.h b/src/lib/libssl/tls1.h index cb68bbb562..2230f0bab8 100644 --- a/src/lib/libssl/tls1.h +++ b/src/lib/libssl/tls1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls1.h,v 1.39 2019/03/19 16:53:03 jsing Exp $ */ | 1 | /* $OpenBSD: tls1.h,v 1.40 2020/01/02 06:23:16 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 | * |
@@ -280,6 +280,15 @@ extern "C" { | |||
280 | #define TLSEXT_TYPE_key_share 51 | 280 | #define TLSEXT_TYPE_key_share 51 |
281 | #endif | 281 | #endif |
282 | 282 | ||
283 | /* | ||
284 | * TLS 1.3 extension names from OpenSSL, where they decided to use a different | ||
285 | * name from that given in RFC 8446. | ||
286 | */ | ||
287 | #if defined(LIBRESSL_HAS_TLS1_3) | ||
288 | #define TLSEXT_TYPE_psk TLSEXT_TYPE_pre_shared_key | ||
289 | #define TLSEXT_TYPE_psk_kex_modes TLSEXT_TYPE_psk_key_exchange_modes | ||
290 | #endif | ||
291 | |||
283 | /* Temporary extension type */ | 292 | /* Temporary extension type */ |
284 | #define TLSEXT_TYPE_renegotiate 0xff01 | 293 | #define TLSEXT_TYPE_renegotiate 0xff01 |
285 | 294 | ||