Skip to content

Commit

Permalink
Updated JSS dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Aug 10, 2018
1 parent 0d8e4d1 commit 7bbfc0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
4 changes: 2 additions & 2 deletions idm-console-framework.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BuildRequires: git

BuildRequires: java-devel >= 1.8.0
BuildRequires: ant >= 1.6.2
BuildRequires: jss >= 4.2.6-35
BuildRequires: jss >= 4.5.0-0.6
BuildRequires: ldapjdk

################################################################################
Expand All @@ -45,7 +45,7 @@ BuildRequires: ldapjdk

# Urge use of OpenJDK for runtime
Requires: java >= 1.8.0
Requires: jss >= 4.2.6-35
Requires: jss >= 4.5.0-0.6
Requires: ldapjdk

%description
Expand Down
19 changes: 10 additions & 9 deletions src/com/netscape/management/client/comm/HttpsChannel.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ executing any jss code. JSS is also a provider (broken one)
cf = UtilConsoleGlobals.getX509CertificateFactory();
cryptoManager = CryptoManager.getInstance();
} catch (Exception e) {
e.printStackTrace();
}
}

Expand Down Expand Up @@ -407,13 +408,13 @@ private int getSSLVersionRangeEnum (String rangeString) {
if (rangeString == null)
return -1;
if (rangeString.equalsIgnoreCase("ssl3"))
return org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.ssl3;
return org.mozilla.jss.ssl.SSLVersionRange.ssl3;
else if (rangeString.equalsIgnoreCase("tls1.0"))
return org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.tls1_0;
return org.mozilla.jss.ssl.SSLVersionRange.tls1_0;
else if (rangeString.equalsIgnoreCase("tls1.1"))
return org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.tls1_1;
return org.mozilla.jss.ssl.SSLVersionRange.tls1_1;
else if (rangeString.equalsIgnoreCase("tls1.2"))
return org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.tls1_2;
return org.mozilla.jss.ssl.SSLVersionRange.tls1_2;

return -1;
}
Expand All @@ -424,8 +425,8 @@ public void open(Preferences pref) throws IOException {
nthPrompt = 0;

// Set our defaults
int min = org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.tls1_0;
int max = org.mozilla.jss.ssl.SSLSocket.SSLVersionRange.tls1_2;
int min = org.mozilla.jss.ssl.SSLVersionRange.tls1_0;
int max = org.mozilla.jss.ssl.SSLVersionRange.tls1_2;

Debug.println("CREATE JSS SSLSocket");

Expand All @@ -441,10 +442,10 @@ public void open(Preferences pref) throws IOException {
}
}

org.mozilla.jss.ssl.SSLSocket.SSLVersionRange range =
new org.mozilla.jss.ssl.SSLSocket.SSLVersionRange(min, max);
org.mozilla.jss.ssl.SSLVersionRange range =
new org.mozilla.jss.ssl.SSLVersionRange(min, max);

SSLSocket.setSSLVersionRangeDefault(org.mozilla.jss.ssl.SSLSocket.SSLProtocolVariant.STREAM, range);
SSLSocket.setSSLVersionRangeDefault(org.mozilla.jss.ssl.SSLProtocolVariant.STREAM, range);

socket = new SSLSocket(InetAddress.getByName(getHost()),
getPort(), null, 0, true, this,
Expand Down
16 changes: 4 additions & 12 deletions src/com/netscape/management/client/util/UtilConsoleGlobals.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,12 @@ executing any jss code. JSS is also a provider (broken one)
CryptoManager.initialize(homePath);
}
catch (AlreadyInitializedException initialized) {}

} catch (Exception e) {}

try {
if (Debug.isTraceTypeEnabled(Debug.TYPE_JSS)) {
org.mozilla.jss.util.Debug.setLevel(org.mozilla.jss.util.Debug.VERBOSE);
}
else {
//604378 Must explicitely disable JSS Debug, as by default the
// JSS Debug level is set to Debug.ERROR.
org.mozilla.jss.util.Debug.setLevel(org.mozilla.jss.util.Debug.QUIET);
}
} catch (RuntimeException e) {
throw e;

} catch (Exception e) {
Debug.println(0 , "Error jss.util.Debug.setLevel " + e);
throw new RuntimeException(e);
}

}
Expand Down

0 comments on commit 7bbfc0e

Please sign in to comment.