File 0233-ssl-Correct-function-for-listing-RC4-suites.patch of Package erlang

From 3af22b0d72a08d56dc99ded123f76574afe68d0b Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 11 Jan 2018 12:24:57 +0100
Subject: [PATCH] ssl: Correct function for listing RC4 suites

---
 lib/ssl/src/ssl_cipher.erl | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index 7efc39e659..2c46de29e2 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -422,7 +422,7 @@ srp_suites() ->
      ?TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
      ?TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA].
 %%--------------------------------------------------------------------
--spec rc4_suites(Version::ssl_record:ssl_version()) -> [cipher_suite()].
+-spec rc4_suites(Version::ssl_record:ssl_version() | integer()) -> [cipher_suite()].
 %%
 %% Description: Returns a list of the RSA|(ECDH/RSA)| (ECDH/ECDSA) 
 %% with RC4 cipher suites, only supported if explicitly set by user. 
@@ -430,13 +430,15 @@ srp_suites() ->
 %% belonged to the user configured only category.
 %%--------------------------------------------------------------------
 rc4_suites({3, 0}) ->
+    rc4_suites(0);
+rc4_suites({3, Minor}) ->
+    rc4_suites(Minor) ++ rc4_suites(0);
+rc4_suites(0) ->
     [?TLS_RSA_WITH_RC4_128_SHA,
      ?TLS_RSA_WITH_RC4_128_MD5];
-rc4_suites({3, N}) when N =< 3 ->
+rc4_suites(N) when N =< 3 ->
     [?TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
      ?TLS_ECDHE_RSA_WITH_RC4_128_SHA,
-     ?TLS_RSA_WITH_RC4_128_SHA,
-     ?TLS_RSA_WITH_RC4_128_MD5,
      ?TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
      ?TLS_ECDH_RSA_WITH_RC4_128_SHA].
 %%--------------------------------------------------------------------
-- 
2.15.1

openSUSE Build Service is sponsored by