Package io.grpc.util
Class AdvancedTlsX509TrustManager.Builder
- java.lang.Object
-
- io.grpc.util.AdvancedTlsX509TrustManager.Builder
-
- Enclosing class:
- AdvancedTlsX509TrustManager
public static final class AdvancedTlsX509TrustManager.Builder extends Object
Builds a newAdvancedTlsX509TrustManager
. By default, no trust certificates are loaded after the build. To load them, use one of the following methods:AdvancedTlsX509TrustManager.updateTrustCredentials(X509Certificate[])
,AdvancedTlsX509TrustManager.updateTrustCredentials(File, long, TimeUnit, ScheduledExecutorService)
,(File, long, TimeUnit, ScheduledExecutorService)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AdvancedTlsX509TrustManager
build()
AdvancedTlsX509TrustManager.Builder
setSslSocketAndEnginePeerVerifier(AdvancedTlsX509TrustManager.SslSocketAndEnginePeerVerifier verifier)
SetsAdvancedTlsX509TrustManager.SslSocketAndEnginePeerVerifier
, which methods will be called in addition to verifying certificates.AdvancedTlsX509TrustManager.Builder
setVerification(AdvancedTlsX509TrustManager.Verification verification)
SetsAdvancedTlsX509TrustManager.Verification
, mode when authenticating the peer certificate.
-
-
-
Method Detail
-
setVerification
public AdvancedTlsX509TrustManager.Builder setVerification(AdvancedTlsX509TrustManager.Verification verification)
SetsAdvancedTlsX509TrustManager.Verification
, mode when authenticating the peer certificate. By default,AdvancedTlsX509TrustManager.Verification.CERTIFICATE_AND_HOST_NAME_VERIFICATION
value is used.- Parameters:
verification
- Verification mode used for the current AdvancedTlsX509TrustManager- Returns:
- Builder with set verification
-
setSslSocketAndEnginePeerVerifier
public AdvancedTlsX509TrustManager.Builder setSslSocketAndEnginePeerVerifier(AdvancedTlsX509TrustManager.SslSocketAndEnginePeerVerifier verifier)
SetsAdvancedTlsX509TrustManager.SslSocketAndEnginePeerVerifier
, which methods will be called in addition to verifying certificates.- Parameters:
verifier
- SslSocketAndEnginePeerVerifier used for the current AdvancedTlsX509TrustManager- Returns:
- Builder with set verifier
-
build
public AdvancedTlsX509TrustManager build() throws CertificateException
- Throws:
CertificateException
-
-