public class SslContextFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PROTOCOL |
static String |
KEY_STORE_TYPE |
Constructor and Description |
---|
SslContextFactory() |
Modifier and Type | Method and Description |
---|---|
static SSLContext |
getInstance(String keyStoreName,
String trustStoreName,
String keyPassword)
Returns SSL context.
|
static SSLContext |
getInstance(String keyStoreName,
String trustStoreName,
String keyPassword,
String keyStorePassword,
String trustStorePassword)
Returns SSL context.
|
static SSLContext |
getInstance(String protocol,
String keyStoreName,
String trustStoreName,
String keyPassword,
String keyStorePassword,
String trustStorePassword)
Returns SSL context.
|
public static final String KEY_STORE_TYPE
public static final String DEFAULT_PROTOCOL
public static SSLContext getInstance(String keyStoreName, String trustStoreName, String keyPassword) throws GeneralSecurityException
keyStoreName
- key store resource name; is loaded via classpath; if not found the empty keystore is usedtrustStoreName
- trust store resource name; is loaded via classpath; can be set to null
if you don't want to validate counterparty's certificatekeyPassword
- key passwordGeneralSecurityException
- if security exception occurredNullPointerException
- if (keyStoreName == null) or (keyStorePassword == null)public static SSLContext getInstance(String keyStoreName, String trustStoreName, String keyPassword, String keyStorePassword, String trustStorePassword) throws GeneralSecurityException
keyStoreName
- key store resource name; is loaded via classpath; if not found the empty keystore is usedtrustStoreName
- trust store resource name; is loaded via classpath; can be set to null
if you don't want to validate counterparty's certificatekeyPassword
- key passwordkeyStorePassword
- key store passwordtrustStorePassword
- trust store passwordGeneralSecurityException
- if security exception occurredNullPointerException
- if (keyStoreName == null) or (keyStorePassword == null) or
((trustStoreName != null) and (trustStorePassword == null))public static SSLContext getInstance(String protocol, String keyStoreName, String trustStoreName, String keyPassword, String keyStorePassword, String trustStorePassword) throws GeneralSecurityException
protocol
- the standard name of the requested protocol. See the SSLContext section in the Java Cryptography
Architecture Standard Algorithm Name Documentation for information about standard protocol names.keyStoreName
- key store resource name; is loaded via classpath; if not found the empty keystore is usedtrustStoreName
- trust store resource name; is loaded via classpath; can be set to null
if you don't want to validate counterparty's certificatekeyPassword
- key passwordkeyStorePassword
- key store passwordtrustStorePassword
- trust store passwordGeneralSecurityException
- if security exception occurredNullPointerException
- if (keyStoreName == null) or (keyStorePassword == null) or
((trustStoreName != null) and (trustStorePassword == null))Copyright © 2005–2024 Onix Solutions. All rights reserved.