aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_handshake_1_3.hrl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-07-17 16:40:04 +0200
committerPéter Dimitrov <[email protected]>2019-07-25 14:49:16 +0200
commit83f9c5c032cc502df38b52d8a5b0389657b37801 (patch)
tree760f2692699cd072006491fdb2da6f25efe79afd /lib/ssl/src/tls_handshake_1_3.hrl
parent22b71cc0264a1db0dd813893b883d34b7e5ee88e (diff)
downloadotp-83f9c5c032cc502df38b52d8a5b0389657b37801.tar.gz
otp-83f9c5c032cc502df38b52d8a5b0389657b37801.tar.bz2
otp-83f9c5c032cc502df38b52d8a5b0389657b37801.zip
ssl: Implement psk_key_exchange_modes extension
Implement encode/decode of psk_key_exchange_modes.
Diffstat (limited to 'lib/ssl/src/tls_handshake_1_3.hrl')
-rw-r--r--lib/ssl/src/tls_handshake_1_3.hrl36
1 files changed, 24 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..78756c69db 100644
--- a/lib/ssl/src/tls_handshake_1_3.hrl
+++ b/lib/ssl/src/tls_handshake_1_3.hrl
@@ -74,29 +74,41 @@
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>
+ }).
+
+-record(pre_shared_key,
+ {
+ data % OfferedPsks (client_hello) | uint16 selected_identity (server_hello)
+ }).
%% RFC 8446 B.3.1.2.
-record(cookie, {