Search in sources :

Example 1 with KeyStoreHelper

use of io.vertx.core.net.impl.KeyStoreHelper in project vert.x by eclipse.

the class KeyStoreTest method testTrustStore.

private void testTrustStore(TrustOptions options) throws Exception {
    KeyStoreHelper helper = KeyStoreHelper.create((VertxInternal) vertx, options);
    TrustManager[] keyManagers = helper.getTrustMgrs((VertxInternal) vertx);
    assertTrue(keyManagers.length > 0);
}
Also used : KeyStoreHelper(io.vertx.core.net.impl.KeyStoreHelper) TrustManager(javax.net.ssl.TrustManager)

Example 2 with KeyStoreHelper

use of io.vertx.core.net.impl.KeyStoreHelper in project vert.x by eclipse.

the class KeyStoreTest method testKeyStore.

private void testKeyStore(KeyCertOptions options) throws Exception {
    KeyStoreHelper helper = KeyStoreHelper.create((VertxInternal) vertx, options);
    KeyStore keyStore = helper.loadStore((VertxInternal) vertx);
    Enumeration<String> aliases = keyStore.aliases();
    assertTrue(aliases.hasMoreElements());
    KeyManager[] keyManagers = helper.getKeyMgrs((VertxInternal) vertx);
    assertTrue(keyManagers.length > 0);
}
Also used : KeyStoreHelper(io.vertx.core.net.impl.KeyStoreHelper) KeyStore(java.security.KeyStore) KeyManager(javax.net.ssl.KeyManager)

Aggregations

KeyStoreHelper (io.vertx.core.net.impl.KeyStoreHelper)2 KeyStore (java.security.KeyStore)1 KeyManager (javax.net.ssl.KeyManager)1 TrustManager (javax.net.ssl.TrustManager)1