Package ghidra.net
Class ApplicationKeyManagerFactory
java.lang.Object
ghidra.net.ApplicationKeyManagerFactory
ApplicationKeyManagerFactory provides a factory for using and caching X509 keystores.-
Method Summary
ChangeModifier and TypeMethodDescriptionNEWstatic voidClear all cached key managers.NEWstatic X509KeyManagergetKeyManager(String keystorePath, String defaultPasswd) Get key manager for specified JKS or PKCS12 keystore file path.static voidSet the active keystore password providerREMOVEDbooleansetKeyStore(String path, boolean savePreference) RemovedREMOVEDStringRemovedREMOVEDStringRemovedREMOVEDbooleanRemovedREMOVEDvoidsetDefaultIdentity(X500Principal identity) RemovedREMOVEDvoidaddSubjectAlternativeName(String subjectAltName) RemovedREMOVEDList<String>RemovedREMOVEDbooleanRemovedREMOVEDvoidRemoved
-
Method Details
-
setKeyStorePasswordProvider
Set the active keystore password provider- Parameters:
provider- keystore password provider
-
clearKeyManagerCache NEW
public static void clearKeyManagerCache()Clear all cached key managers. NOTE: This is primarily intended for test use only. -
getKeyManager NEW
public static X509KeyManager getKeyManager(String keystorePath, String defaultPasswd) throws CancelledException, KeyStoreException Get key manager for specified JKS or PKCS12 keystore file path. The user may be prompted for a password if required which will block the invocation of this synchronized method. If successfully opened, the resulting key manager instance will be cached for subsequent re-use of the same keystore.- Parameters:
keystorePath- protected keystore pathdefaultPasswd- default password (e.g., supplied by property) or null- Returns:
- key manager
- Throws:
CancelledException- password entry was cancelled by userKeyStoreException- error occurred opening/processing keystore
-