diff options
author | Péter Dimitrov <[email protected]> | 2019-07-26 14:49:20 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2019-07-26 14:49:20 +0200 |
commit | 5fc96782a03e2fa170a8a7a3781d32b176af0548 (patch) | |
tree | 25d708ff218dc9b94a583e23dfd94b3f1069582f /lib/ssl/src/tls_handshake_1_3.hrl | |
parent | 7ac38b4a99e74f2bc6c8843bf11eece318010738 (diff) | |
parent | 91e7806587ac256346a4e4b1c8bd5cdd744a2934 (diff) | |
download | otp-5fc96782a03e2fa170a8a7a3781d32b176af0548.tar.gz otp-5fc96782a03e2fa170a8a7a3781d32b176af0548.tar.bz2 otp-5fc96782a03e2fa170a8a7a3781d32b176af0548.zip |
Merge branch 'peterdmv/ssl/psk' into maint
* peterdmv/ssl/psk:
ssl: Reorder testcases in ssl_api_SUITE
ssl: Fix handshake pause in TLS 1.3
ssl: Implement option honor_cipher_order in TLS 1.3
ssl: Add test for option supported_groups
ssl: Document option supported_groups
ssl: Fix ssl_api_SUITE:connection_information
ssl: Fix property tests for SSLv3
ssl: Update property tests with pre_shared_key
ssl: Implement pre_shared_key extension
ssl: Update property tests with psk_key_exchange_modes
ssl: Implement psk_key_exchange_modes extension
Diffstat (limited to 'lib/ssl/src/tls_handshake_1_3.hrl')
-rw-r--r-- | lib/ssl/src/tls_handshake_1_3.hrl | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/lib/ssl/src/tls_handshake_1_3.hrl b/lib/ssl/src/tls_handshake_1_3.hrl index 7ae1b93e1c..eb85f216c8 100644 --- a/lib/ssl/src/tls_handshake_1_3.hrl +++ b/lib/ssl/src/tls_handshake_1_3.hrl @@ -74,29 +74,52 @@ y % opaque Y[coordinate_length]; }). +%% RFC 8446 4.2.9. Pre-Shared Key Exchange Modes + +%% enum { psk_ke(0), psk_dhe_ke(1), (255) } PskKeyExchangeMode; -define(PSK_KE, 0). -define(PSK_DHE_KE, 1). --record(psk_keyexchange_modes, { +-record(psk_key_exchange_modes, { ke_modes % ke_modes<1..255> }). + +%% RFC 8446 4.2.10. Early Data Indication -record(empty, { }). -record(early_data_indication, { indication % uint32 max_early_data_size (new_session_ticket) | %% #empty{} (client_hello, encrypted_extensions) }). --record(psk_identity, { - identity, % opaque identity<1..2^16-1> - obfuscated_ticket_age % uint32 - }). --record(offered_psks, { - psk_identity, %identities<7..2^16-1>; - psk_binder_entry %binders<33..2^16-1>, opaque PskBinderEntry<32..255> - }). --record(pre_shared_keyextension,{ - extension %OfferedPsks (client_hello) | uint16 selected_identity (server_hello) - }). + +%% RFC 8446 4.2.11. Pre-Shared Key Extension +-record(psk_identity, + { + identity, % opaque identity<1..2^16-1> + obfuscated_ticket_age % uint32 + }). + +-record(offered_psks, + { + identities, % PskIdentity identities<7..2^16-1>; + binders % PskBinderEntry binders<33..2^16-1>; opaque PskBinderEntry<32..255> + }). + +%% struct { +%% select (Handshake.msg_type) { +%% case client_hello: OfferedPsks; +%% case server_hello: uint16 selected_identity; +%% }; +%% } PreSharedKeyExtension; +-record(pre_shared_key_client_hello, + { + offered_psks + }). + +-record(pre_shared_key_server_hello, + { + selected_identity + }). %% RFC 8446 B.3.1.2. -record(cookie, { |