public static final class TlsServerCredentials.Builder extends Object
TlsServerCredentials
.Modifier and Type | Method and Description |
---|---|
ServerCredentials |
build()
Construct the credentials.
|
TlsServerCredentials.Builder |
clientAuth(TlsServerCredentials.ClientAuth clientAuth)
Indicates whether the server should expect a client's identity.
|
TlsServerCredentials.Builder |
keyManager(File certChain,
File privateKey)
Use the provided certificate chain and private key as the server's identity.
|
TlsServerCredentials.Builder |
keyManager(File certChain,
File privateKey,
String privateKeyPassword)
Use the provided certificate chain and possibly-encrypted private key as the server's
identity.
|
TlsServerCredentials.Builder |
keyManager(InputStream certChain,
InputStream privateKey)
Use the provided certificate chain and private key as the server's identity.
|
TlsServerCredentials.Builder |
keyManager(InputStream certChain,
InputStream privateKey,
String privateKeyPassword)
Use the provided certificate chain and possibly-encrypted private key as the server's
identity.
|
TlsServerCredentials.Builder |
keyManager(KeyManager... keyManagers)
Have the provided key manager select the server's identity.
|
TlsServerCredentials.Builder |
requireFakeFeature()
Requires
TlsServerCredentials.Feature.FAKE to be understood. |
TlsServerCredentials.Builder |
trustManager(File rootCerts)
Use the provided root certificates to verify the client's identity instead of the system's
default.
|
TlsServerCredentials.Builder |
trustManager(InputStream rootCerts)
Use the provided root certificates to verify the client's identity instead of the system's
default.
|
TlsServerCredentials.Builder |
trustManager(TrustManager... trustManagers)
Have the provided trust manager verify the client's identity instead of the system's default.
|
public TlsServerCredentials.Builder requireFakeFeature()
TlsServerCredentials.Feature.FAKE
to be understood. For use in testing consumers of this
credential.public TlsServerCredentials.Builder keyManager(File certChain, File privateKey) throws IOException
IOException
public TlsServerCredentials.Builder keyManager(File certChain, File privateKey, String privateKeyPassword) throws IOException
null
.IOException
public TlsServerCredentials.Builder keyManager(InputStream certChain, InputStream privateKey) throws IOException
IOException
public TlsServerCredentials.Builder keyManager(InputStream certChain, InputStream privateKey, String privateKeyPassword) throws IOException
null
.IOException
public TlsServerCredentials.Builder keyManager(KeyManager... keyManagers)
X509KeyManager
.public TlsServerCredentials.Builder clientAuth(TlsServerCredentials.ClientAuth clientAuth)
null
.
Defaults to TlsServerCredentials.ClientAuth.NONE
.public TlsServerCredentials.Builder trustManager(File rootCerts) throws IOException
IOException
public TlsServerCredentials.Builder trustManager(InputStream rootCerts) throws IOException
IOException
public TlsServerCredentials.Builder trustManager(TrustManager... trustManagers)
X509TrustManager
.public ServerCredentials build()