diff options
author | Péter Dimitrov <[email protected]> | 2018-07-06 13:12:32 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2018-07-19 14:26:45 +0200 |
commit | de8efcb60451d65404bd3b70d464da43af239be5 (patch) | |
tree | f9673d9963cc3527a53841ce86a2db4c8cbd3a89 /lib/ssl/src/ssl_logger.erl | |
parent | 9f3426df630f50c30004c35f7c70e34baa381092 (diff) | |
download | otp-de8efcb60451d65404bd3b70d464da43af239be5.tar.gz otp-de8efcb60451d65404bd3b70d464da43af239be5.tar.bz2 otp-de8efcb60451d65404bd3b70d464da43af239be5.zip |
ssl: Add experimental version 'tlsv1.3'
- Add 'tlsv1.3' to the available versions. It can be used to
trigger experimental behavior while implementing TLS 1.3.
- Add dummy clauses for handling version {3,4} of TLS.
- Update ssl_logger to handle unknown versions of TLS.
Change-Id: I564ffa47dca18b59f0dc16c9809dfd7adaf2d333
Diffstat (limited to 'lib/ssl/src/ssl_logger.erl')
-rw-r--r-- | lib/ssl/src/ssl_logger.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/ssl/src/ssl_logger.erl b/lib/ssl/src/ssl_logger.erl index 23e9e096cc..35c8dcfd48 100644 --- a/lib/ssl/src/ssl_logger.erl +++ b/lib/ssl/src/ssl_logger.erl @@ -156,7 +156,9 @@ version({3,2}) -> version({3,1}) -> "TLS 1.0"; version({3,0}) -> - "SSL 3.0". + "SSL 3.0"; +version({M,N}) -> + io_lib:format("TLS [0x0~B0~B]", [M,N]). header_prefix(inbound) -> @@ -183,7 +185,6 @@ header_prefix_tls_record(outbound) -> "writing". - tls_record_version([<<?BYTE(B),?BYTE(3),?BYTE(3),_/binary>>|_]) -> io_lib:format("TLS 1.2 Record Protocol, ~s", [msg_type(B)]); tls_record_version([<<?BYTE(B),?BYTE(3),?BYTE(2),_/binary>>|_]) -> @@ -191,7 +192,9 @@ tls_record_version([<<?BYTE(B),?BYTE(3),?BYTE(2),_/binary>>|_]) -> tls_record_version([<<?BYTE(B),?BYTE(3),?BYTE(1),_/binary>>|_]) -> io_lib:format("TLS 1.0 Record Protocol, ~s", [msg_type(B)]); tls_record_version([<<?BYTE(B),?BYTE(3),?BYTE(0),_/binary>>|_]) -> - io_lib:format("SSL 3.0 Record Protocol, ~s", [msg_type(B)]). + io_lib:format("SSL 3.0 Record Protocol, ~s", [msg_type(B)]); +tls_record_version([<<?BYTE(B),?BYTE(M),?BYTE(N),_/binary>>|_]) -> + io_lib:format("TLS [0x0~B0~B] Record Protocol, ~s", [M, N, msg_type(B)]). msg_type(20) -> "change_cipher_spec"; |