[jboss-cvs] jboss-tomcat/src/main/org/jboss/net/ssl ...
Anil Saldhana
anil.saldhana at jboss.com
Thu Jul 13 14:38:55 EDT 2006
User: asaldhana
Date: 06/07/13 14:38:55
Modified: src/main/org/jboss/net/ssl JBossSocketFactory.java
Log:
JBAS-3392: If the securityDomain has not been injected, make a noise.
Revision Changes Path
1.5 +13 -0 jboss-tomcat/src/main/org/jboss/net/ssl/JBossSocketFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: JBossSocketFactory.java
===================================================================
RCS file: /cvsroot/jboss/jboss-tomcat/src/main/org/jboss/net/ssl/JBossSocketFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- JBossSocketFactory.java 21 Jun 2006 19:38:59 -0000 1.4
+++ JBossSocketFactory.java 13 Jul 2006 18:38:55 -0000 1.5
@@ -93,6 +93,7 @@
protected KeyStore getKeystore(String type, String pass)
throws IOException
{
+ verifySecurityDomain();
return securityDomain.getKeyStore();
}
@@ -104,6 +105,7 @@
*/
protected KeyStore getTrustStore(String type) throws IOException
{
+ verifySecurityDomain();
return securityDomain.getTrustStore();
}
@@ -118,6 +120,7 @@
protected TrustManager[] getTrustManagers(String keystoreType, String algorithm)
throws Exception
{
+ verifySecurityDomain();
TrustManagerFactory tmf = securityDomain.getTrustManagerFactory();
TrustManager[] trustMgrs = null;
@@ -141,6 +144,7 @@
String keyAlias)
throws Exception
{
+ verifySecurityDomain();
KeyManagerFactory kmf = securityDomain.getKeyManagerFactory();
KeyManager[] keyMgrs = null;
if( kmf != null )
@@ -149,4 +153,13 @@
}
return keyMgrs;
}
+
+ private void verifySecurityDomain()
+ {
+ String str = "securityDomain is null." +
+ "Set it as an attribute in the connector setting";
+
+ if(this.securityDomain == null)
+ throw new IllegalStateException(str);
+ }
}
More information about the jboss-cvs-commits
mailing list