summaryrefslogtreecommitdiffstats
path: root/base/util
diff options
context:
space:
mode:
Diffstat (limited to 'base/util')
-rw-r--r--base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
index fd7b1bb23..5e6659363 100644
--- a/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
+++ b/base/util/src/com/netscape/cmsutil/crypto/CryptoUtil.java
@@ -961,9 +961,15 @@ public class CryptoUtil {
public static void setSSLCipher(String cipher, boolean enabled) throws SocketException {
- Integer cipherID = cipherMap.get(cipher);
- if (cipherID == null) {
- throw new SocketException("Unsupported cipher: " + cipher);
+ Integer cipherID;
+ if (cipher.toLowerCase().startsWith("0x")) {
+ cipherID = Integer.parseInt(cipher.substring(2), 16);
+
+ } else {
+ cipherID = cipherMap.get(cipher);
+ if (cipherID == null) {
+ throw new SocketException("Unsupported cipher: " + cipher);
+ }
}
SSLSocket.setCipherPreferenceDefault(cipherID, enabled);