Search in sources :

Example 1 with X509ExtendedKeyManagerImpl

use of org.obiba.ssl.X509ExtendedKeyManagerImpl in project mica2 by obiba.

the class SslContextFactoryImpl method createSslContext.

@Override
public SSLContext createSslContext() {
    KeyStoreManager keystore = prepareServerKeystore();
    try {
        SSLContext ctx = SSLContext.getInstance("TLSv1.2");
        ctx.init(new KeyManager[] { new X509ExtendedKeyManagerImpl(keystore) }, null, null);
        return ctx;
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}
Also used : KeyStoreManager(org.obiba.security.KeyStoreManager) SSLContext(javax.net.ssl.SSLContext) X509ExtendedKeyManagerImpl(org.obiba.ssl.X509ExtendedKeyManagerImpl)

Aggregations

SSLContext (javax.net.ssl.SSLContext)1 KeyStoreManager (org.obiba.security.KeyStoreManager)1 X509ExtendedKeyManagerImpl (org.obiba.ssl.X509ExtendedKeyManagerImpl)1