Author: jfrederic.clere(a)jboss.com
Date: 2014-08-19 10:20:29 -0400 (Tue, 19 Aug 2014)
New Revision: 2488
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESocketChannelFactory.java
Log:
[BZ-1108307] Improve the ability to use MS Windows keystore for the web servers ssl
connector
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
===================================================================
---
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2014-08-18
13:17:22 UTC (rev 2487)
+++
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 2014-08-19
14:20:29 UTC (rev 2488)
@@ -239,7 +239,9 @@
throws IOException {
String keystoreFile = (String)attributes.get("keystore");
- if (keystoreFile == null)
+ if ("Windows-MY".equalsIgnoreCase(type))
+ keystoreFile = "";
+ else if (keystoreFile == null)
keystoreFile = defaultKeystoreFile;
return getStore(type, provider, keystoreFile, pass);
@@ -273,6 +275,9 @@
if(truststoreType == null) {
truststoreType = keystoreType;
}
+ if ("Windows-ROOT".equalsIgnoreCase(truststoreType))
+ truststoreFile = "";
+
if(CoyoteLogger.UTIL_LOGGER.isDebugEnabled()) {
CoyoteLogger.UTIL_LOGGER.debug("trustType = " + truststoreType);
}
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESocketChannelFactory.java
===================================================================
---
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESocketChannelFactory.java 2014-08-18
13:17:22 UTC (rev 2487)
+++
branches/7.5.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESocketChannelFactory.java 2014-08-19
14:20:29 UTC (rev 2488)
@@ -372,7 +372,9 @@
protected KeyStore getKeystore(String type, String provider, String pass) throws
IOException {
String keystoreFile = (String) attributes.get("keystore");
- if (keystoreFile == null)
+ if ("Windows-MY".equalsIgnoreCase(type))
+ keystoreFile = "";
+ else if (keystoreFile == null)
keystoreFile = defaultKeystoreFile;
return getStore(type, provider, keystoreFile, pass);
@@ -555,6 +557,9 @@
if (truststoreType == null) {
truststoreType = keystoreType;
}
+ if ("Windows-ROOT".equalsIgnoreCase(truststoreType))
+ truststoreFile = "";
+
if (CoyoteLogger.UTIL_LOGGER.isDebugEnabled()) {
CoyoteLogger.UTIL_LOGGER.debug("trustType = " + truststoreType);
}
Show replies by date