Package ghidra.framework.remote.security
Class SSHKeyManager
- java.lang.Object
-
- ghidra.framework.remote.security.SSHKeyManager
-
public class SSHKeyManager extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectgetSSHPrivateKey(java.io.File sshPrivateKeyFile)Return the SSH private key corresponding to the specified key file.static java.lang.ObjectgetSSHPrivateKey(java.io.InputStream sshPrivateKeyIn)Return the SSH private key corresponding to the specified key input stream.static java.lang.ObjectgetSSHPublicKey(java.io.File sshPublicKeyFile)Attempt to instantiate an SSH public key from the specified file which contains a single public key.static voidsetProtectedKeyStorePasswordProvider(KeyStorePasswordProvider provider)Set PKI protected keystore password provider
-
-
-
Method Detail
-
setProtectedKeyStorePasswordProvider
public static void setProtectedKeyStorePasswordProvider(KeyStorePasswordProvider provider)
Set PKI protected keystore password provider- Parameters:
provider-
-
getSSHPrivateKey
public static java.lang.Object getSSHPrivateKey(java.io.File sshPrivateKeyFile) throws java.io.IOExceptionReturn the SSH private key corresponding to the specified key file. If the specified key file is encrypted the currently installed password provider will be used to obtain the decrypt password.- Parameters:
sshPrivateKeyFile-- Returns:
- RSAPrivateKey or DSAPrivateKey
- Throws:
java.io.FileNotFoundException- key file not foundjava.io.IOException- if key file not found or key parse failed- See Also:
RSAPrivateKey,DSAPrivateKey
-
getSSHPrivateKey
public static java.lang.Object getSSHPrivateKey(java.io.InputStream sshPrivateKeyIn) throws java.io.IOExceptionReturn the SSH private key corresponding to the specified key input stream. If the specified key is encrypted the currently installed password provider will be used to obtain the decrypt password.- Parameters:
sshPrivateKeyIn-- Returns:
- RSAPrivateKey or DSAPrivateKey
- Throws:
java.io.FileNotFoundException- key file not foundjava.io.IOException- if key file not found or key parse failed- See Also:
RSAPrivateKey,DSAPrivateKey
-
getSSHPublicKey
public static java.lang.Object getSSHPublicKey(java.io.File sshPublicKeyFile) throws java.io.IOExceptionAttempt to instantiate an SSH public key from the specified file which contains a single public key.- Parameters:
sshPublicKeyFile-- Returns:
- RSAPublicKey or DSAPublicKey
- Throws:
java.io.FileNotFoundException- key file not foundjava.io.IOException- if key file not found or key parse failed- See Also:
RSAPublicKey,DSAPublicKey
-
-