public synchronized void addKeyStore(String description, KeyStore ks, char[] password) throws KeyStoreException, UnrecoverableKeyException {
try {
KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
kmf.init(ks, password);
KeyManager km = kmf.getKeyManagers()[0];
if (!(km instanceof X509KeyManager))
throw new KeyStoreException("KeyManager for " + description + "is not X509!");
_stores.put(description, ks);
_managers.put(description, (X509KeyManager) km);
} catch (NoSuchAlgorithmException nsae) {