com.softwareag.tamino.db.api.common
Class TSSLProperties

java.lang.Object
  extended by com.softwareag.tamino.db.api.common.TSSLProperties

public class TSSLProperties
extends java.lang.Object

Handle the SSL properties for the 2-way ssl protocol. It is constructed with property values like this: "com.softwareag.centrasite.security.[key|trust]Store...".
If one of the custom properties is not defined then the system counterpart is investigated, e.g. |javax.net.ssl.trustStore".

After construction, the truststore (for 1-way SSL) or truststore + keystore (for 2-way SSL) is established.

Author:
asc

Field Summary
static java.lang.String PROP_KEYSTORE
           
static java.lang.String PROP_KEYSTORE_PW
           
static java.lang.String PROP_KEYSTORE_TYPE
           
static java.lang.String PROP_TRUSTSTORE
           
static java.lang.String PROP_TRUSTSTORE_PW
           
static java.lang.String PROP_TRUSTSTORE_TYPE
           
 
Constructor Summary
TSSLProperties()
          Constructor for supporting system ssl properties (javax.net.ssl.xxx).
TSSLProperties(java.util.Properties sslProperties)
          Constructor for supporting custom ssl properties.
 
Method Summary
 java.security.KeyStore getKeyStore()
          Returns the keystore.
 java.lang.String getKeyStorePw()
          Get the password of the keystore (not truststore).
 java.security.KeyStore getTrustStore()
          Returns the truststore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_KEYSTORE

public static final java.lang.String PROP_KEYSTORE
See Also:
Constant Field Values

PROP_KEYSTORE_PW

public static final java.lang.String PROP_KEYSTORE_PW
See Also:
Constant Field Values

PROP_KEYSTORE_TYPE

public static final java.lang.String PROP_KEYSTORE_TYPE
See Also:
Constant Field Values

PROP_TRUSTSTORE

public static final java.lang.String PROP_TRUSTSTORE
See Also:
Constant Field Values

PROP_TRUSTSTORE_PW

public static final java.lang.String PROP_TRUSTSTORE_PW
See Also:
Constant Field Values

PROP_TRUSTSTORE_TYPE

public static final java.lang.String PROP_TRUSTSTORE_TYPE
See Also:
Constant Field Values
Constructor Detail

TSSLProperties

public TSSLProperties(java.util.Properties sslProperties)
               throws TSSLPropertiesException
Constructor for supporting custom ssl properties. If a custom property is not specified then the default one is used.

Parameters:
sslProperties - properties class with custom ssl properties (null or empty: only consider system properties)
Throws:
TSSLPropertiesException - problems with the ssl properties

TSSLProperties

public TSSLProperties()
               throws TSSLPropertiesException
Constructor for supporting system ssl properties (javax.net.ssl.xxx).

Throws:
TSSLPropertiesException
Method Detail

getKeyStorePw

public java.lang.String getKeyStorePw()
Get the password of the keystore (not truststore).

Returns:
keystore's password

getKeyStore

public java.security.KeyStore getKeyStore()
Returns the keystore. If no keystore is given then 1-way SSL is assumed.

Returns:
the keystore (null: 1-way SSL)

getTrustStore

public java.security.KeyStore getTrustStore()
Returns the truststore.

Returns:
the truststore


Copyright (c) 2013 Software AG. All Rights Reserved.