From 035f37b6416e9b001ff49e06142751b974835a9b Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Sun, 19 Mar 2017 20:08:50 +0100 Subject: Fixed error handling in CryptoUtil.setClientCiphers(). The CryptoUtil.setClientCiphers() has been modified to throw an exception on unsupported cipher. --- base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'base/util') diff --git a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java index 70aaa373f..729d71d63 100644 --- a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java +++ b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java @@ -944,7 +944,9 @@ public class CryptoUtil { for (String cipher : ciphers) { Integer cipherID = cipherMap.get(cipher); - if (cipherID == null) continue; + if (cipherID == null) { + throw new SocketException("Unsupported cipher: " + cipher); + } SSLSocket.setCipherPreferenceDefault(cipherID, true); } -- cgit