Skip to content

Commit

Permalink
Merge pull request erlang#7841 from ahovgaard/ssl/fix-signature-algs-…
Browse files Browse the repository at this point in the history
…spec

ssl: Fix typespec for signature_algs/2 and export signature_algs/0 type

OTP-18853
  • Loading branch information
IngelaAndin authored Nov 10, 2023
2 parents fbe53ad + e1ef127 commit f74018f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/ssl/src/ssl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
srp_param_type/0,
named_curve/0,
sign_scheme/0,
signature_algs/0,
group/0]).

%% -------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -1108,7 +1109,7 @@ append_cipher_suites(Filters, Suites) ->
(Suites -- Deferred) ++ Deferred.

%%--------------------------------------------------------------------
-spec signature_algs(Description, Version) -> [signature_algs()] when
-spec signature_algs(Description, Version) -> signature_algs() when
Description :: default | all | exclusive,
Version :: protocol_version().

Expand Down Expand Up @@ -1138,9 +1139,9 @@ signature_algs(Description, 'dtlsv1.2') ->
signature_algs(Description, Version) when Description == default;
Description == all;
Description == exclusive->
{error, {signature_algs_not_supported_in_protocol_version, Version}};
signature_algs(Description,_) ->
{error, {badarg, Description}}.
erlang:error({signature_algs_not_supported_in_protocol_version, Version});
signature_algs(Description, Version) ->
erlang:error(badarg, [Description, Version]).

%%--------------------------------------------------------------------
-spec eccs() -> NamedCurves when
Expand Down

0 comments on commit f74018f

Please sign in to comment.