diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-03-19 20:08:50 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-03-19 20:47:43 +0100 |
commit | 035f37b6416e9b001ff49e06142751b974835a9b (patch) | |
tree | bbca767c53f1790b2e8889ed8ab71277c2ac5911 /base/util | |
parent | cdffde5b5449db804e98ccac624cdc5eeab29dce (diff) | |
download | pki-035f37b6416e9b001ff49e06142751b974835a9b.tar.gz pki-035f37b6416e9b001ff49e06142751b974835a9b.tar.xz pki-035f37b6416e9b001ff49e06142751b974835a9b.zip |
Fixed error handling in CryptoUtil.setClientCiphers().
The CryptoUtil.setClientCiphers() has been modified to throw
an exception on unsupported cipher.
Diffstat (limited to 'base/util')
-rw-r--r-- | base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |