From 90885d08ccfc2cad4ba87f5a85decc979de56702 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 18 Feb 2019 16:59:41 +0100 Subject: ssl: Correct merge commit thanks to dialyzer Also make a weaker spec in ssl_internal.hrl for now as it creates a conflict between error handling and dialyzer warnings. --- lib/ssl/src/ssl.erl | 1 + lib/ssl/src/ssl_internal.hrl | 3 ++- lib/ssl/src/tls_connection.erl | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index fed7aa1141..d06f61f17d 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -87,6 +87,7 @@ private_key_type/0, cipher/0, hash/0, + key/0, key_algo/0, sign_algo/0 ]). diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl index 085a045169..3d117a655f 100644 --- a/lib/ssl/src/ssl_internal.hrl +++ b/lib/ssl/src/ssl_internal.hrl @@ -122,7 +122,8 @@ cert :: public_key:der_encoded() | secret_printout() | 'undefined', keyfile :: binary(), key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', - public_key:der_encoded()} | ssl:key() | secret_printout() | 'undefined', + public_key:der_encoded()} | map() %%map() -> ssl:key() how to handle dialyzer? + | secret_printout() | 'undefined', password :: string() | secret_printout() | 'undefined', cacerts :: [public_key:der_encoded()] | secret_printout() | 'undefined', cacertfile :: binary(), diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl index a47caed410..ebb723673e 100644 --- a/lib/ssl/src/tls_connection.erl +++ b/lib/ssl/src/tls_connection.erl @@ -587,8 +587,8 @@ hello(internal, #client_hello{client_version = ClientVersion} = Hello, Renegotiation) of #alert{} = Alert -> ssl_connection:handle_own_alert(Alert, ClientVersion, hello, - State#state{connection_env = #connection_env{negotiated_version - = ClientVersion}}); + State#state{connection_env = CEnv#connection_env{negotiated_version + = ClientVersion}}); {Version, {Type, Session}, ConnectionStates, Protocol0, ServerHelloExt, HashSign} -> Protocol = case Protocol0 of -- cgit v1.2.3