diff options
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); } } |