public final class SslContextBuilder extends Object
The crypto performed by this class is relatively slow. Clients should reuse SSL context instances where possible.
| Constructor and Description |
|---|
SslContextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
SslContextBuilder |
addTrustedCertificate(X509Certificate certificate)
Add a certificate authority that this client trusts.
|
SSLContext |
build() |
SslContextBuilder |
certificateChain(HeldCertificate... chain)
Configure the certificate chain to use when serving HTTPS responses.
|
static SSLContext |
localhost()
Returns a new SSL context for this host's current localhost address.
|
public static SSLContext localhost()
public SslContextBuilder certificateChain(HeldCertificate... chain)
public SslContextBuilder addTrustedCertificate(X509Certificate certificate)
public SSLContext build() throws GeneralSecurityException
GeneralSecurityExceptionCopyright © 2016. All Rights Reserved.