public class SSLSocketKeystoreFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SSLSocketKeystoreFactory.SecureType
A SSL algorithms types chooser enum
|
| Constructor and Description |
|---|
SSLSocketKeystoreFactory() |
| Modifier and Type | Method and Description |
|---|---|
static SSLSocket |
getSocketWithCert(InetAddress ip,
int port,
InputStream pathToCert,
String passwordFromCert,
SSLSocketKeystoreFactory.SecureType type)
Instantiate sslsocket
|
static SSLSocket |
getSocketWithCert(InetAddress ip,
int port,
InputStream pathToCert,
String passwordFromCert,
SSLSocketKeystoreFactory.SecureType type,
Proxy proxy)
Instantiate sslsocket (beta proxy)
|
static SSLSocket |
getSocketWithCert(InetAddress ip,
int port,
String pathToCert,
String passwordFromCert,
SSLSocketKeystoreFactory.SecureType type)
Instantiate sslsocket
|
static SSLSocket |
getSocketWithCert(String ip,
int port,
InputStream pathToCert,
String passwordFromCert,
SSLSocketKeystoreFactory.SecureType type)
Instantiate sslsocket
|
static SSLSocket |
getSocketWithCert(String ip,
int port,
String pathToCert,
String passwordFromCert,
SSLSocketKeystoreFactory.SecureType type)
Instantiate sslsocket
|
public static SSLSocket getSocketWithCert(String ip, int port, String pathToCert, String passwordFromCert, SSLSocketKeystoreFactory.SecureType type) throws IOException, KeyManagementException, NoSuchAlgorithmException, CertificateException, KeyStoreException, SocketException
ip - The IP to connect the socket toport - The port of the socketpathToCert - The path to the KeyStore cert (can be with getClass().getRessource()....)passwordFromCert - The password of the KeyStore certtype - The SSL algorithm to useIOException - If the socket couldn't be createdKeyManagementException - If the KeyManager couldn't be loadedCertificateException - If the certificate is not correct (null or damaged) or the password is incorrectNoSuchAlgorithmException - If the certificate is from an unknown typeKeyStoreException - If your system is not compatible with JKS KeyStore certificatesSocketExceptionpublic static SSLSocket getSocketWithCert(String ip, int port, InputStream pathToCert, String passwordFromCert, SSLSocketKeystoreFactory.SecureType type) throws IOException, KeyManagementException, NoSuchAlgorithmException, CertificateException, KeyStoreException, SocketException
ip - The IP to connect the socket toport - The port of the socketpathToCert - The path to the KeyStore cert (can be with getClass().getRessourceAsStream()....)passwordFromCert - The password of the KeyStore certtype - The SSL algorithm to useIOException - If the socket couldn't be createdKeyManagementException - If the KeyManager couldn't be loadedCertificateException - If the certificate is not correct (null or damaged) or the password is incorrectNoSuchAlgorithmException - If the certificate is from an unknown typeKeyStoreException - If your system is not compatible with JKS KeyStore certificatesSocketExceptionpublic static SSLSocket getSocketWithCert(InetAddress ip, int port, String pathToCert, String passwordFromCert, SSLSocketKeystoreFactory.SecureType type) throws IOException, KeyManagementException, NoSuchAlgorithmException, CertificateException, KeyStoreException, SocketException
ip - The IP to connect the socket toport - The port of the socketpathToCert - The path to the KeyStore cert (can be with getClass().getRessource()....)passwordFromCert - The password of the KeyStore certtype - The SSL algorithm to useIOException - If the socket couldn't be createdKeyManagementException - If the KeyManager couldn't be loadedCertificateException - If the certificate is not correct (null or damaged) or the password is incorrectNoSuchAlgorithmException - If the certificate is from an unknown typeKeyStoreException - If your system is not compatible with JKS KeyStore certificatesSocketExceptionpublic static SSLSocket getSocketWithCert(InetAddress ip, int port, InputStream pathToCert, String passwordFromCert, SSLSocketKeystoreFactory.SecureType type) throws IOException, KeyManagementException, NoSuchAlgorithmException, CertificateException, KeyStoreException, SocketException
ip - The IP to connect the socket toport - The port of the socketpathToCert - The path to the KeyStore cert (can be with getClass().getRessourceAsStream()....)passwordFromCert - The password of the KeyStore certtype - The SSL algorithm to useIOException - If the socket couldn't be createdKeyManagementException - If the KeyManager couldn't be loadedCertificateException - If the certificate is not correct (null or damaged) or the password is incorrectNoSuchAlgorithmException - If the certificate is from an unknown typeKeyStoreException - If your system is not compatible with JKS KeyStore certificatesSocketExceptionpublic static SSLSocket getSocketWithCert(InetAddress ip, int port, InputStream pathToCert, String passwordFromCert, SSLSocketKeystoreFactory.SecureType type, Proxy proxy) throws IOException, KeyManagementException, NoSuchAlgorithmException, CertificateException, KeyStoreException, SocketException
ip - The IP to connect the socket toport - The port of the socketpathToCert - The path to the KeyStore cert (can be with getClass().getRessourceAsStream()....)passwordFromCert - The password of the KeyStore certtype - The SSL algorithm to useIOException - If the socket couldn't be createdKeyManagementException - If the KeyManager couldn't be loadedCertificateException - If the certificate is not correct (null or damaged) or the password is incorrectNoSuchAlgorithmException - If the certificate is from an unknown typeKeyStoreException - If your system is not compatible with JKS KeyStore certificatesSocketExceptionCopyright © 2023. All rights reserved.