TrustManagerFactory or TrustManager.
InputStream trustStoreStream = null;
KeyStore trustStore = KeyStore.getInstance("JKS");
trustStore.load(trustStoreStream, "truststore-password".toCharArray());
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init(trustStore);
HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setTrustOptions(new TrustManagerFactoryOptions(keyManagerFactory));
// or with a TrustManager
TrustManager trustManager = trustManagerFactory.getTrustManagers()[0];
options.setTrustOptions(new TrustManagerFactoryOptions(trustManager));
As this class is not available because it is part of the internal api the proper usage would be:
// with a TrustManager options.setTrustOptions(TrustOptions.wrap(trustManager)); // with a TrustManagerFactory options.setTrustOptions(TrustOptions.wrap(trustManagerFactory));
| Modifier and Type | Field and Description |
|---|---|
| private final TrustManagerFactory |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public TrustOptions | |
| public TrustManagerFactory | getTrustManagerFactory(Vertx
the vertx instance vertx)Implements io. Create and return the trust manager factory for these options. |
| public Function | trustManagerMapper(Vertx
the vertx instance vertx)Implements io. Returns a function that maps SNI server names to a |
| trustManagerFactory | back to summary |
|---|---|
| private final TrustManagerFactory trustManagerFactory | |
| TrustManagerFactoryOptions | back to summary |
|---|---|
| pack-priv TrustManagerFactoryOptions(TrustManagerFactory trustManagerFactory) | |
| TrustManagerFactoryOptions | back to summary |
|---|---|
| pack-priv TrustManagerFactoryOptions(TrustManager trustManager) | |
| TrustManagerFactoryOptions | back to summary |
|---|---|
| private TrustManagerFactoryOptions(TrustManagerFactoryOptions other) | |
| copy | back to summary |
|---|---|
| public TrustOptions copy() Implements io.
| |
| getTrustManagerFactory | back to summary |
|---|---|
| public TrustManagerFactory getTrustManagerFactory(Vertx vertx) Implements io. Doc from io. Create and return the trust manager factory for these options. The returned trust manager factory should be already initialized and ready to use.
| |
| trustManagerMapper | back to summary |
|---|---|
| public Function Implements io. Doc from io. Returns a function that maps SNI server names to a
The returned function may return
| |