[jboss-cvs] jboss-tomcat/src/main/org/jboss/net/ssl ...

Anil Saldhana anil.saldhana at jboss.com
Thu Jul 13 14:43:49 EDT 2006


  User: asaldhana
  Date: 06/07/13 14:43:49

  Modified:    src/main/org/jboss/net/ssl  Tag: Branch_4_0
                        JBossSocketFactory.java
  Log:
  JBAS-3392: If the securityDomain has not been injected, make a noise.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.1.1.16.3 +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.1.1.1.16.2
  retrieving revision 1.1.1.1.16.3
  diff -u -b -r1.1.1.1.16.2 -r1.1.1.1.16.3
  --- JBossSocketFactory.java	29 Oct 2005 05:07:34 -0000	1.1.1.1.16.2
  +++ JBossSocketFactory.java	13 Jul 2006 18:43:49 -0000	1.1.1.1.16.3
  @@ -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