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