From e1ef1272e2eb869ed3d5b7ff2b3d25b207c284a7 Mon Sep 17 00:00:00 2001 From: Anders Kiel Hovgaard Date: Wed, 8 Nov 2023 15:18:57 +0100 Subject: [PATCH] Fix typespec for signature_algs/2 and export signature_algs/0 type --- lib/ssl/src/ssl.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index 2069c9912646..24f921e48657 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -141,6 +141,7 @@ srp_param_type/0, named_curve/0, sign_scheme/0, + signature_algs/0, group/0]). %% ------------------------------------------------------------------------------------------------------- @@ -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(). @@ -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