public class SslConfiguration extends Object
Provides configuration for a key store and trust store for TLS certificate verification. Key store and trust store may be left unconfigured if the JDK trust store contains all necessary certificates to verify TLS certificates. The key store is used for Client Certificate authentication.
Resource
,
KeyStore
,
ClientCertificateAuthentication
Modifier and Type | Class and Description |
---|---|
static class |
SslConfiguration.KeyStoreConfiguration
Configuration for a key store/trust store.
|
Modifier and Type | Field and Description |
---|---|
static SslConfiguration |
NONE
Default
SslConfiguration without a KeyStore/TrustStore configured. |
Constructor and Description |
---|
SslConfiguration(org.springframework.core.io.Resource keyStore,
String keyStorePassword,
org.springframework.core.io.Resource trustStore,
String trustStorePassword)
Deprecated.
Since 1.1, use
SslConfiguration(KeyStoreConfiguration, KeyStoreConfiguration) to prevent
String interning and retaining passwords represented as String longer from
GC than necessary. |
SslConfiguration(SslConfiguration.KeyStoreConfiguration keyStoreConfiguration,
SslConfiguration.KeyStoreConfiguration trustStoreConfiguration)
Create a new
SslConfiguration . |
Modifier and Type | Method and Description |
---|---|
SslConfiguration |
create(org.springframework.core.io.Resource keyStore,
char[] keyStorePassword,
org.springframework.core.io.Resource trustStore,
char[] trustStorePassword)
Create a new
SslConfiguration for the given truststore with the default
KeyStore type. |
SslConfiguration |
create(org.springframework.core.io.Resource keyStore,
String keyStorePassword,
org.springframework.core.io.Resource trustStore,
String trustStorePassword)
Deprecated.
Since 1.1, use
create(Resource, char[], Resource, char[]) to
prevent String interning and retaining passwords represented as String
longer from GC than necessary. |
static SslConfiguration |
forKeyStore(org.springframework.core.io.Resource keyStore,
char[] keyStorePassword)
Create a new
SslConfiguration for the given key store with the default
KeyStore type. |
static SslConfiguration |
forKeyStore(org.springframework.core.io.Resource keyStore,
String keyStorePassword)
Deprecated.
Since 1.1, use
forKeyStore(Resource, char[]) to prevent
String interning and retaining passwords represented as String longer from
GC than necessary. |
static SslConfiguration |
forTrustStore(org.springframework.core.io.Resource trustStore,
char[] trustStorePassword)
Create a new
SslConfiguration for the given trust store with the default
KeyStore type. |
static SslConfiguration |
forTrustStore(org.springframework.core.io.Resource trustStore,
String trustStorePassword)
Deprecated.
Since 1.1, use
forTrustStore(Resource, char[]) to prevent
String interning and retaining passwords represented as String longer from
GC than necessary. |
org.springframework.core.io.Resource |
getKeyStore() |
SslConfiguration.KeyStoreConfiguration |
getKeyStoreConfiguration() |
String |
getKeyStorePassword()
Deprecated.
Since 1.1, use
SslConfiguration.KeyStoreConfiguration.getStorePassword() to
prevent String interning and retaining passwords represented as String
longer from GC than necessary. |
org.springframework.core.io.Resource |
getTrustStore() |
SslConfiguration.KeyStoreConfiguration |
getTrustStoreConfiguration() |
String |
getTrustStorePassword()
Deprecated.
Since 1.1, use
SslConfiguration.KeyStoreConfiguration.getStorePassword() to
prevent String interning and retaining passwords represented as String
longer from GC than necessary. |
public static final SslConfiguration NONE
SslConfiguration
without a KeyStore/TrustStore configured.@Deprecated public SslConfiguration(org.springframework.core.io.Resource keyStore, String keyStorePassword, org.springframework.core.io.Resource trustStore, String trustStorePassword)
SslConfiguration(KeyStoreConfiguration, KeyStoreConfiguration)
to prevent
String
interning and retaining passwords represented as String longer from
GC than necessary.SslConfiguration
with the default KeyStore
type.keyStore
- the key store resource.keyStorePassword
- the key store password.trustStore
- the trust store resource.trustStorePassword
- the trust store password.public SslConfiguration(SslConfiguration.KeyStoreConfiguration keyStoreConfiguration, SslConfiguration.KeyStoreConfiguration trustStoreConfiguration)
SslConfiguration
.keyStoreConfiguration
- the key store configuration.trustStoreConfiguration
- the trust store configuration.@Deprecated public static SslConfiguration forTrustStore(org.springframework.core.io.Resource trustStore, String trustStorePassword)
forTrustStore(Resource, char[])
to prevent
String
interning and retaining passwords represented as String longer from
GC than necessary.SslConfiguration
for the given trust store with the default
KeyStore
type.trustStore
- resource pointing to an existing trust store, must not be
null.trustStorePassword
- may be null.SslConfiguration
.KeyStore
public static SslConfiguration forTrustStore(org.springframework.core.io.Resource trustStore, char[] trustStorePassword)
SslConfiguration
for the given trust store with the default
KeyStore
type.trustStore
- resource pointing to an existing trust store, must not be
null.trustStorePassword
- may be null.SslConfiguration
.KeyStore
@Deprecated public static SslConfiguration forKeyStore(org.springframework.core.io.Resource keyStore, String keyStorePassword)
forKeyStore(Resource, char[])
to prevent
String
interning and retaining passwords represented as String longer from
GC than necessary.SslConfiguration
for the given key store with the default
KeyStore
type.keyStore
- resource pointing to an existing key store, must not be
null.keyStorePassword
- may be null.SslConfiguration
.KeyStore
public static SslConfiguration forKeyStore(org.springframework.core.io.Resource keyStore, char[] keyStorePassword)
SslConfiguration
for the given key store with the default
KeyStore
type.keyStore
- resource pointing to an existing key store, must not be
null.keyStorePassword
- may be null.SslConfiguration
.KeyStore
@Deprecated public SslConfiguration create(org.springframework.core.io.Resource keyStore, String keyStorePassword, org.springframework.core.io.Resource trustStore, String trustStorePassword)
create(Resource, char[], Resource, char[])
to
prevent String
interning and retaining passwords represented as String
longer from GC than necessary.SslConfiguration
for the given truststore with the default
KeyStore
type.keyStore
- resource pointing to an existing keystore, must not be
null.keyStorePassword
- may be null.trustStore
- resource pointing to an existing trust store, must not be
null.trustStorePassword
- may be null.SslConfiguration
.KeyStore
public SslConfiguration create(org.springframework.core.io.Resource keyStore, char[] keyStorePassword, org.springframework.core.io.Resource trustStore, char[] trustStorePassword)
SslConfiguration
for the given truststore with the default
KeyStore
type.keyStore
- resource pointing to an existing keystore, must not be
null.keyStorePassword
- may be null.trustStore
- resource pointing to an existing trust store, must not be
null.trustStorePassword
- may be null.SslConfiguration
.KeyStore
public org.springframework.core.io.Resource getKeyStore()
key store
resource or null if
not configured.@Deprecated public String getKeyStorePassword()
SslConfiguration.KeyStoreConfiguration.getStorePassword()
to
prevent String
interning and retaining passwords represented as String
longer from GC than necessary.public SslConfiguration.KeyStoreConfiguration getKeyStoreConfiguration()
public org.springframework.core.io.Resource getTrustStore()
key store
resource or null if
not configured.@Deprecated public String getTrustStorePassword()
SslConfiguration.KeyStoreConfiguration.getStorePassword()
to
prevent String
interning and retaining passwords represented as String
longer from GC than necessary.public SslConfiguration.KeyStoreConfiguration getTrustStoreConfiguration()
Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.