aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-03-23 09:06:25 +0100
committerIngela Anderton Andin <[email protected]>2015-03-23 09:06:25 +0100
commit84dca51e002b99f0348b715f2f4d484e492bb518 (patch)
tree348678fd49bcc71051e147d804ea1b8c594e2132
parentd8d522251a7b8a1b3a69718e9328eb62acc9e22c (diff)
parentd3df580ae275751f541ff6d55c0ba532e166fb70 (diff)
downloadotp-84dca51e002b99f0348b715f2f4d484e492bb518.tar.gz
otp-84dca51e002b99f0348b715f2f4d484e492bb518.tar.bz2
otp-84dca51e002b99f0348b715f2f4d484e492bb518.zip
Merge branch 'ia/ssl/dialyzer/alpn-and-crl'
* ia/ssl/dialyzer/alpn-and-crl: ssl: Dialyzer fixes
-rw-r--r--lib/ssl/src/ssl_crl_cache_api.erl6
-rw-r--r--lib/ssl/src/ssl_internal.hrl14
-rw-r--r--lib/ssl/src/tls_handshake.erl11
3 files changed, 17 insertions, 14 deletions
diff --git a/lib/ssl/src/ssl_crl_cache_api.erl b/lib/ssl/src/ssl_crl_cache_api.erl
index 0915ba12e5..79db65104b 100644
--- a/lib/ssl/src/ssl_crl_cache_api.erl
+++ b/lib/ssl/src/ssl_crl_cache_api.erl
@@ -25,6 +25,6 @@
-type db_handle() :: term().
--callback lookup(#'DistributionPoint'{}, db_handle()) -> not_available | [public_key:der_encode()].
--callback select(term(), db_handle()) -> [public_key:der_encode()].
--callback fresh_crl(#'DistributionPoint'{}, public_key:der_encode()) -> public_key:der_encode().
+-callback lookup(#'DistributionPoint'{}, db_handle()) -> not_available | [public_key:der_encoded()].
+-callback select(term(), db_handle()) -> [public_key:der_encoded()].
+-callback fresh_crl(#'DistributionPoint'{}, public_key:der_encoded()) -> public_key:der_encoded().
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
index e09a72a3f3..90f8b8a412 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -116,18 +116,18 @@
hibernate_after :: boolean(),
%% This option should only be set to true by inet_tls_dist
erl_dist = false :: boolean(),
- alpn_advertised_protocols = undefined :: [binary()],
- alpn_preferred_protocols = undefined :: [binary()],
- next_protocols_advertised = undefined, %% [binary()],
+ alpn_advertised_protocols = undefined :: [binary()] | undefined ,
+ alpn_preferred_protocols = undefined :: [binary()] | undefined,
+ next_protocols_advertised = undefined :: [binary()] | undefined,
next_protocol_selector = undefined, %% fun([binary()]) -> binary())
log_alert :: boolean(),
server_name_indication = undefined,
%% Should the server prefer its own cipher order over the one provided by
%% the client?
- honor_cipher_order = false,
- padding_check = true,
- fallback = false,
- crl_check,
+ honor_cipher_order = false :: boolean(),
+ padding_check = true :: boolean(),
+ fallback = false :: boolean(),
+ crl_check :: boolean() | peer | best_effort,
crl_cache
}).
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 2d50dd7e46..d936310991 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -78,11 +78,14 @@ client_hello(Host, Port, ConnectionStates,
%%--------------------------------------------------------------------
-spec hello(#server_hello{} | #client_hello{}, #ssl_options{},
#connection_states{} | {inet:port_number(), #session{}, db_handle(),
- atom(), #connection_states{}, binary() | undefined},
+ atom(), #connection_states{},
+ binary() | undefined},
boolean()) ->
- {tls_record:tls_version(), session_id(), #connection_states{}, binary() | undefined}|
- {tls_record:tls_version(), {resumed | new, #session{}}, #connection_states{},
- #hello_extensions{}} |
+ {tls_record:tls_version(), session_id(),
+ #connection_states{}, alpn | npn, binary() | undefined}|
+ {tls_record:tls_version(), {resumed | new, #session{}},
+ #connection_states{}, binary() | undefined,
+ #hello_extensions{}} |
#alert{}.
%%
%% Description: Handles a recieved hello message