>From d86adbd33feb23ed689ee14a83204214f69226c4 Mon Sep 17 00:00:00 2001
From: Christina Fu <cfu@redhat.com>
Date: Thu, 13 Aug 2015 20:33:47 +0200
Subject: [PATCH] Ticket 1556 Weak HTTPS TLS ciphers This patch turns off
 weaker ciphers

---
 .../python/pki/server/deployment/pkiparser.py      | 55 +++++++++++-----------
 1 file changed, 27 insertions(+), 28 deletions(-)

diff --git a/base/server/python/pki/server/deployment/pkiparser.py b/base/server/python/pki/server/deployment/pkiparser.py
index c1b6be3954d250450c7a3ad035aaf7b4b69c24ad..5896a419f2bf2ac942b6be5bc9603bf75f5a1f1c 100644
--- a/base/server/python/pki/server/deployment/pkiparser.py
+++ b/base/server/python/pki/server/deployment/pkiparser.py
@@ -923,21 +923,21 @@ class PKIConfigParser:
                 "tls1_1:tls1_2"
             if self.mdict['pki_ssl_server_key_type'] == "ecc":
                 self.mdict['TOMCAT_SSL_RANGE_CIPHERS_SLOT'] = \
-                    "+TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "+TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "+TLS_ECDH_RSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_ECDH_RSA_WITH_AES_256_CBC_SHA," + \
-                    "+TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_ECDH_RSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDH_RSA_WITH_AES_256_CBC_SHA," + \
+                    "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," + \
                     "+TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_RSA_WITH_3DES_EDE_CBC_SHA," + \
                     "-TLS_RSA_WITH_AES_128_CBC_SHA," + \
                     "-TLS_RSA_WITH_AES_256_CBC_SHA," + \
                     "+TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
                     "+TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "+TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_AES_128_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_AES_256_CBC_SHA," + \
@@ -954,9 +954,8 @@ class PKIConfigParser:
                     "+TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256," + \
                     "+TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256," + \
                     "+TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256," + \
-                    "+TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256," + \
                     "+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256," + \
-                    "+TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"
+                    "-TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"
             else:
                 self.mdict['TOMCAT_SSL_RANGE_CIPHERS_SLOT'] = \
                     "-TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA," + \
@@ -966,33 +965,33 @@ class PKIConfigParser:
                     "-TLS_ECDH_RSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA," + \
-                    "+TLS_RSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "+TLS_RSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_RSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA," + \
                     "-TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA," + \
                     "-TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "-TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," + \
-                    "-TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," + \
+                    "+TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA," + \
+                    "+TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_AES_128_CBC_SHA," + \
                     "-TLS_DHE_DSS_WITH_AES_256_CBC_SHA," + \
-                    "+TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
-                    "+TLS_DHE_RSA_WITH_AES_128_CBC_SHA," + \
-                    "+TLS_DHE_RSA_WITH_AES_256_CBC_SHA," + \
-                    "+TLS_DHE_RSA_WITH_AES_128_CBC_SHA256," + \
-                    "+TLS_DHE_RSA_WITH_AES_256_CBC_SHA256," + \
-                    "+TLS_RSA_WITH_AES_128_CBC_SHA256," + \
-                    "+TLS_RSA_WITH_AES_256_CBC_SHA256," + \
-                    "+TLS_RSA_WITH_AES_128_GCM_SHA256," + \
-                    "+TLS_DHE_RSA_WITH_AES_128_GCM_SHA256," + \
+                    "-TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_DHE_RSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_DHE_RSA_WITH_AES_256_CBC_SHA," + \
+                    "-TLS_DHE_RSA_WITH_AES_128_CBC_SHA256," + \
+                    "-TLS_DHE_RSA_WITH_AES_256_CBC_SHA256," + \
+                    "-TLS_DHE_RSA_WITH_AES_128_GCM_SHA256," + \
                     "-TLS_DHE_DSS_WITH_AES_128_GCM_SHA256," + \
                     "-TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256," + \
-                    "-TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256," + \
+                    "+TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256," + \
                     "-TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256," + \
                     "-TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256," + \
-                    "-TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256," + \
-                    "-TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256"
+                    "+TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256," + \
+                    "-TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256," +\
+                    "-TLS_RSA_WITH_AES_128_CBC_SHA256," + \
+                    "-TLS_RSA_WITH_AES_256_CBC_SHA256," + \
+                    "-TLS_RSA_WITH_AES_128_GCM_SHA256," + \
+                    "-TLS_RSA_WITH_3DES_EDE_CBC_SHA," + \
+                    "-TLS_RSA_WITH_AES_128_CBC_SHA," + \
+                    "-TLS_RSA_WITH_AES_256_CBC_SHA"
             self.mdict['TOMCAT_SSL2_CIPHERS_SLOT'] = \
                 "-SSL2_RC4_128_WITH_MD5," + \
                 "-SSL2_RC4_128_EXPORT40_WITH_MD5," + \
-- 
1.8.4.2

