use of org.obiba.security.KeyStoreManager in project mica2 by obiba.
the class KeyStoreService method deleteKeyPair.
public void deleteKeyPair(String name, String alias) {
KeyStoreManager ksm = getKeyStore(name);
if (ksm.hasKeyPair(alias)) {
ksm.deleteKey(alias);
saveKeyStore(ksm);
}
}
use of org.obiba.security.KeyStoreManager 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);
}
}
Aggregations