[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/security ...

Tom Elrod tom.elrod at jboss.com
Mon Aug 7 17:17:33 EDT 2006


  User: telrod  
  Date: 06/08/07 17:17:32

  Modified:    src/main/org/jboss/remoting/security   SSLSocketBuilder.java
                        SSLSocketBuilderMBean.java
  Log:
  JBREM-568 - updated ssl socket builder so attribute types (getter/setter) is of same type for all attributes.
  
  Revision  Changes    Path
  1.11      +210 -162  JBossRemoting/src/main/org/jboss/remoting/security/SSLSocketBuilder.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SSLSocketBuilder.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/security/SSLSocketBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- SSLSocketBuilder.java	20 Jun 2006 15:35:41 -0000	1.10
  +++ SSLSocketBuilder.java	7 Aug 2006 21:17:32 -0000	1.11
  @@ -57,7 +57,7 @@
    * @author <a href="mailto:mazz at jboss.com">John Mazzitelli</a>
    * @author <a href="mailto:telrod at jboss.com">Tom Elrod</a>
    * 
  - * @version $Revision: 1.10 $
  + * @version $Revision: 1.11 $
    */
   public class SSLSocketBuilder implements SSLSocketBuilderMBean, Cloneable
   {
  @@ -539,7 +539,23 @@
      /**
       * @see org.jboss.remoting.security.SSLSocketBuilderMBean#getKeyStoreURL()
       */
  -   public URL getKeyStoreURL()
  +   public String getKeyStoreURL()
  +   {
  +      URL keyStore = getKeyStore();
  +      if(keyStore != null)
  +      {
  +         return keyStore.toString();
  +      }
  +      else
  +      {
  +         return null;
  +      }
  +   }
  +
  +   /**
  +    * @see org.jboss.remoting.security.SSLSocketBuilderMBean#getKeyStore()
  +    */
  +   public URL getKeyStore()
      {
         if(keyStoreFilePath != null)
         {
  @@ -583,6 +599,14 @@
      }
   
      /**
  +    * @see org.jboss.remoting.security.SSLSocketBuilderMBean#setKeyStore(java.net.URL)
  +    */
  +   public void setKeyStore(URL keyStore)
  +   {
  +      this.keyStoreFilePath = keyStore;
  +   }
  +
  +   /**
       * @see org.jboss.remoting.security.SSLSocketBuilderMBean#getKeyStoreType()
       */
      public String getKeyStoreType()
  @@ -697,7 +721,23 @@
      /**
       * @see org.jboss.remoting.security.SSLSocketBuilderMBean#getTrustStoreURL()
       */
  -   public URL getTrustStoreURL()
  +   public String getTrustStoreURL()
  +   {
  +      URL trustStore = getTrustStore();
  +      if(trustStore != null)
  +      {
  +         return trustStore.toString();
  +      }
  +      else
  +      {
  +         return null;
  +      }
  +   }
  +
  +   /**
  +    * @see org.jboss.remoting.security.SSLSocketBuilderMBean#getTrustStore()
  +    */
  +   public URL getTrustStore()
      {
         if(trustStoreFilePath != null)
         {
  @@ -726,6 +766,14 @@
      }
   
      /**
  +    * @see org.jboss.remoting.security.SSLSocketBuilderMBean#setTrustStore(java.net.URL)
  +    */
  +   public void setTrustStore(URL trustStore)
  +   {
  +      this.trustStoreFilePath = trustStore;
  +   }
  +
  +   /**
       * @see org.jboss.remoting.security.SSLSocketBuilderMBean#setTrustStoreURL(java.lang.String)
       */
      public void setTrustStoreURL(String trustStoreFilePath)
  @@ -1303,7 +1351,7 @@
         {
            String tsType = getTrustStoreType();
            String tsPasswd = getTrustStorePassword();
  -         URL tsPathURL = getTrustStoreURL();
  +         URL tsPathURL = getTrustStore();
            
            String tsAlg = getTrustStoreAlgorithm();
            
  @@ -1353,7 +1401,7 @@
      {
         String ksPasswd = getKeyStorePassword();
         String ksType = getKeyStoreType();
  -      URL ksPathURL = getKeyStoreURL();
  +      URL ksPathURL = getKeyStore();
         
         KeyStore keyStore = loadKeyStore(ksType, ksPathURL, ksPasswd);
   
  
  
  
  1.8       +35 -8     JBossRemoting/src/main/org/jboss/remoting/security/SSLSocketBuilderMBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: SSLSocketBuilderMBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/security/SSLSocketBuilderMBean.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- SSLSocketBuilderMBean.java	20 Jun 2006 15:36:16 -0000	1.7
  +++ SSLSocketBuilderMBean.java	7 Aug 2006 21:17:32 -0000	1.8
  @@ -34,7 +34,7 @@
    *
    * @author  <a href="mailto:mazz at jboss.com">John Mazzitelli</a>
    * @author  <a href="mailto:telrod at jboss.com">Tom Elrod</a>
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public interface SSLSocketBuilderMBean
   {
  @@ -235,7 +235,13 @@
       *
       * @return path to keystore
       */
  -   URL getKeyStoreURL();
  +   URL getKeyStore();
  +
  +   /**
  +    * Returns the path to the key store as a String.
  +    * @return path to keystore
  +    */
  +   String getKeyStoreURL();
   
      /**
       * Sets the path to the keystore file. This can be relative to the classloader or can be an absolute path to
  @@ -246,6 +252,12 @@
      void setKeyStoreURL( String keyStoreFilePath );
   
      /**
  +    * Sets the path to the keystore file as a URL
  +    * @param keyStoreURL
  +    */
  +   void setKeyStore(URL keyStoreURL);
  +
  +   /**
       * Returns the keystore's file type. This is typically "JKS".
       *
       * @return keystore file type.
  @@ -285,7 +297,14 @@
       *
       * @return path to truststore
       */
  -   URL getTrustStoreURL();
  +   URL getTrustStore();
  +
  +   /**
  +    * Gets the path to the truststore file.
  +    *
  +    * @return path to truststore
  +    */
  +   String getTrustStoreURL();
   
      /**
       * Sets the path to the truststore file. This can be relative to the classloader or can be an absolute path to
  @@ -296,6 +315,14 @@
      void setTrustStoreURL( String trustStoreFilePath );
   
      /**
  +    * Sets the path to the truststore file. This can be relative to the classloader or can be an absolute path to
  +    * someplace on the file system or can be a URL string. If the path is not valid, a runtime exception is thrown.
  +    *
  +    * @param trustStore path to truststore
  +    */
  +   void setTrustStore( URL trustStore );
  +
  +   /**
       * Gets the truststore's file type. Typically this is "JKS". If not set, the key store file type is used or the
       * default if that isn't set.
       *
  
  
  



More information about the jboss-cvs-commits mailing list