diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-03-19 19:52:51 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-03-19 20:46:07 +0100 |
commit | cdffde5b5449db804e98ccac624cdc5eeab29dce (patch) | |
tree | 56165d7b6fc07d0135e4d458d5224acb6026b7ef /base/util | |
parent | a168db3f36584a6a576daa91c993d18c134835fe (diff) | |
download | pki-cdffde5b5449db804e98ccac624cdc5eeab29dce.tar.gz pki-cdffde5b5449db804e98ccac624cdc5eeab29dce.tar.xz pki-cdffde5b5449db804e98ccac624cdc5eeab29dce.zip |
Fixed error handling in CryptoUtil.unsetSSLCiphers().
The CryptoUtil.unsetSSLCiphers() has been modified not to ignore
exceptions.
Diffstat (limited to 'base/util')
-rw-r--r-- | base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java index 17d314a01..70aaa373f 100644 --- a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java +++ b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java @@ -985,13 +985,13 @@ public class CryptoUtil { /* * unset all implemented cipehrs; for enforcing strict list of ciphers */ - private static void unsetSSLCiphers() throws SocketException { - int ciphers[] = SSLSocket.getImplementedCipherSuites(); - try { - for (int i = 0; ciphers != null && i < ciphers.length; i++) { - SSLSocket.setCipherPreferenceDefault(ciphers[i], false); - } - } catch (Exception e) { + public static void unsetSSLCiphers() throws SocketException { + + int cipherIDs[] = SSLSocket.getImplementedCipherSuites(); + if (cipherIDs == null) return; + + for (int cipherID : cipherIDs) { + SSLSocket.setCipherPreferenceDefault(cipherID, false); } } |