File 4574-ssl-Add-guard-for-possible-future-algorithms-not-bee.patch of Package erlang

From 50abbfdd57ad9b0d28821e6b650262c739a8ceed Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 14 Oct 2021 11:06:02 +0200
Subject: [PATCH 4/4] ssl: Add guard for possible future algorithms not beeing
 handled as legacy

---
 lib/ssl/src/ssl_cipher.erl | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index af53640ab9..f2e9511553 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -636,7 +636,12 @@ signature_scheme(?ECDSA_SHA1) -> ecdsa_sha1;
 %% cannot be used in TLS 1.3 handshakes.
 signature_scheme(SignAlgo) when is_integer(SignAlgo) ->
     <<?BYTE(Hash),?BYTE(Sign)>> = <<?UINT16(SignAlgo)>>,
-    {ssl_cipher:hash_algorithm(Hash), ssl_cipher:sign_algorithm(Sign)};
+    try
+        {ssl_cipher:hash_algorithm(Hash), ssl_cipher:sign_algorithm(Sign)}
+    catch
+        _:_ ->
+            unassigned
+    end;
 signature_scheme(_) -> unassigned.
 
 signature_schemes_1_2(SigAlgs) ->
-- 
2.31.1

openSUSE Build Service is sponsored by