net.schmizz.sshj.userauth.keyprovider
Class OpenSSHKeyFile
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile
net.schmizz.sshj.userauth.keyprovider.OpenSSHKeyFile
- All Implemented Interfaces:
- FileKeyProvider, KeyProvider
public class OpenSSHKeyFile
- extends PKCS8KeyFile
Represents an OpenSSH identity that consists of a PKCS8-encoded private key file and an unencrypted public key file
of the same name with the ".pub"
extension. This allows to delay requesting of the passphrase until the
private key is requested.
- See Also:
PKCS8KeyFile
OpenSSHKeyFile
public OpenSSHKeyFile()
getPublic
public PublicKey getPublic()
throws IOException
- Specified by:
getPublic
in interface KeyProvider
- Overrides:
getPublic
in class PKCS8KeyFile
- Returns:
- the public key.
- Throws:
IOException
- if there is an I/O error retrieving the public key
init
public void init(File location)
- Specified by:
init
in interface FileKeyProvider
- Overrides:
init
in class PKCS8KeyFile
init
public void init(String privateKey,
String publicKey)
- Specified by:
init
in interface FileKeyProvider
- Overrides:
init
in class PKCS8KeyFile
Copyright © 2009-2012. All Rights Reserved.