boolean (@NotNull String alias) { myWriteLock.lock(); try { if (isBroken()) { return false; } // for listeners X509Certificate certificate = getCertificate(alias); if (certificate == null) { LOG.error("No certificate found for alias: " + alias); return false; } myKeyStore.deleteEntry(alias); flushKeyStore(); // trust manager should be updated each time its key store was modified myTrustManager = initFactoryAndGetManager(); myDispatcher.getMulticaster().certificateRemoved(certificate); return true; } catch (Exception e) { LOG.error("Cannot remove certificate for alias: " + alias, e); return false; } finally { myWriteLock.unlock(); } }