Package com.webmethods.jms.ssl
Class AwSSLUtil
- java.lang.Object
-
- com.webmethods.jms.ssl.AwSSLUtil
-
public class AwSSLUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
CLIENT_WANTS_CLEARTEXT_CONNECTION
static int
CLIENT_WANTS_CLIENT_AUTHENTICATED
static int
CLIENT_WANTS_SERVER_AUTHENTICATID
static java.lang.String
JSSE_PROVIDER_IAIK
static java.lang.String
KEYSTORE_TYPE_ENTRUST
static java.lang.String
KEYSTORE_TYPE_JKS
static java.lang.String
KEYSTORE_TYPE_PKCS12
static java.lang.String
osname
static java.lang.String
PROTOCOL_TYPE_SSLv3
static java.lang.String
PROTOCOL_TYPE_TLSv1
static java.lang.String
PROTOCOL_TYPE_TLSv1_1
static java.lang.String
PROTOCOL_TYPE_TLSv1_2
static java.lang.String
PROTOCOL_TYPE_TLSv1_3
static java.lang.String
SSL_PROVIDER_ENTRUST
static java.lang.String
SSL_PROVIDER_JSSE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkPort(java.lang.String hostname, int port)
static boolean
compareDNs(java.lang.String dn1, java.lang.String dn2)
static java.lang.String[]
convertStringToArray(java.lang.String commaSeparatedString)
static java.security.cert.Certificate
getCert(java.security.KeyStore keystoreInstance)
static AwSSLCertificate
getCertificateForDn(AwSSLContext context, java.lang.String dn)
static java.lang.String[]
getDnList(java.security.KeyStore keystoreInstance)
static AwSSLUtil
getInstance()
static AwSSLCertificate
getOtherPartysCertificate(AwSSLSocketInfo socket)
static java.lang.String[]
getTRList(AwSSLContext context)
static boolean
isDnAvailable(AwSSLContext context, java.lang.String dn)
static int
recv(javax.net.ssl.SSLSocket sock, byte[] buf, int offset, int length)
static void
send(javax.net.ssl.SSLSocket sock, byte[] data, int offset, int length)
static void
validateSslClientCertificate(java.security.KeyStore keystoreInstance)
-
-
-
Field Detail
-
CLIENT_WANTS_SERVER_AUTHENTICATID
public static final int CLIENT_WANTS_SERVER_AUTHENTICATID
- See Also:
- Constant Field Values
-
CLIENT_WANTS_CLIENT_AUTHENTICATED
public static final int CLIENT_WANTS_CLIENT_AUTHENTICATED
- See Also:
- Constant Field Values
-
CLIENT_WANTS_CLEARTEXT_CONNECTION
public static final int CLIENT_WANTS_CLEARTEXT_CONNECTION
- See Also:
- Constant Field Values
-
KEYSTORE_TYPE_ENTRUST
public static final java.lang.String KEYSTORE_TYPE_ENTRUST
- See Also:
- Constant Field Values
-
KEYSTORE_TYPE_PKCS12
public static final java.lang.String KEYSTORE_TYPE_PKCS12
- See Also:
- Constant Field Values
-
KEYSTORE_TYPE_JKS
public static final java.lang.String KEYSTORE_TYPE_JKS
- See Also:
- Constant Field Values
-
JSSE_PROVIDER_IAIK
public static final java.lang.String JSSE_PROVIDER_IAIK
- See Also:
- Constant Field Values
-
PROTOCOL_TYPE_SSLv3
public static final java.lang.String PROTOCOL_TYPE_SSLv3
- See Also:
- Constant Field Values
-
PROTOCOL_TYPE_TLSv1
public static final java.lang.String PROTOCOL_TYPE_TLSv1
- See Also:
- Constant Field Values
-
PROTOCOL_TYPE_TLSv1_1
public static final java.lang.String PROTOCOL_TYPE_TLSv1_1
- See Also:
- Constant Field Values
-
PROTOCOL_TYPE_TLSv1_2
public static final java.lang.String PROTOCOL_TYPE_TLSv1_2
- See Also:
- Constant Field Values
-
PROTOCOL_TYPE_TLSv1_3
public static final java.lang.String PROTOCOL_TYPE_TLSv1_3
- See Also:
- Constant Field Values
-
osname
public static final java.lang.String osname
-
SSL_PROVIDER_ENTRUST
public static final java.lang.String SSL_PROVIDER_ENTRUST
- See Also:
- Constant Field Values
-
SSL_PROVIDER_JSSE
public static final java.lang.String SSL_PROVIDER_JSSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static AwSSLUtil getInstance()
-
validateSslClientCertificate
public static void validateSslClientCertificate(java.security.KeyStore keystoreInstance) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
getDnList
public static java.lang.String[] getDnList(java.security.KeyStore keystoreInstance) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
getCert
public static java.security.cert.Certificate getCert(java.security.KeyStore keystoreInstance) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
getCertificateForDn
public static AwSSLCertificate getCertificateForDn(AwSSLContext context, java.lang.String dn) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
getTRList
public static java.lang.String[] getTRList(AwSSLContext context)
-
getOtherPartysCertificate
public static AwSSLCertificate getOtherPartysCertificate(AwSSLSocketInfo socket) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isDnAvailable
public static boolean isDnAvailable(AwSSLContext context, java.lang.String dn) throws java.lang.RuntimeException
- Throws:
java.lang.RuntimeException
-
send
public static void send(javax.net.ssl.SSLSocket sock, byte[] data, int offset, int length)
-
recv
public static int recv(javax.net.ssl.SSLSocket sock, byte[] buf, int offset, int length)
-
convertStringToArray
public static java.lang.String[] convertStringToArray(java.lang.String commaSeparatedString)
-
compareDNs
public static boolean compareDNs(java.lang.String dn1, java.lang.String dn2)
-
checkPort
public static boolean checkPort(java.lang.String hostname, int port)
-
-