jlibs.core.net
Class SSLUtil
java.lang.Object
jlibs.core.net.SSLUtil
public class SSLUtil
- extends Object
- Author:
- Santhosh Kumar Tekuti
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DUMMY_TRUST_MANAGERS
public static final TrustManager[] DUMMY_TRUST_MANAGERS
SSLUtil
public SSLUtil()
isClientHello
public static boolean isClientHello(byte firstByte)
getX509CertificateChain
public static X509Certificate[] getX509CertificateChain(String host,
int port)
throws GeneralSecurityException,
IOException
- Throws:
GeneralSecurityException
IOException
newKeyStore
public static KeyStore newKeyStore(String type,
String file,
char[] password)
throws SSLException
- Throws:
SSLException
getKeyStoreType
public static String getKeyStoreType()
getKeyStoreLocation
public static String getKeyStoreLocation()
getKeyStorePassword
public static char[] getKeyStorePassword()
defaultKeyStore
public static KeyStore defaultKeyStore()
throws SSLException
- Throws:
SSLException
getTrustStoreType
public static String getTrustStoreType()
getTrustStoreLocation
public static String getTrustStoreLocation()
getTrustStorePassword
public static char[] getTrustStorePassword()
defaultTrustStore
public static KeyStore defaultTrustStore()
throws SSLException
- Throws:
SSLException
newContext
public static SSLContext newContext(KeyStore keyStore,
char[] keyStorePassword,
String keyAlias,
KeyStore trustStore)
throws SSLException,
GeneralSecurityException
- Throws:
SSLException
GeneralSecurityException
defaultContext
public static SSLContext defaultContext()
throws SSLException,
GeneralSecurityException
- Throws:
SSLException
GeneralSecurityException
Copyright © 2018. All rights reserved.