Class OpenSSHKeyFile
- java.lang.Object
-
- net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenSSHKeyFile.Factory
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile
log, privateKeyInfoKeyPairConverter
-
Fields inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
kp, pwdf, resource, type
-
-
Constructor Summary
Constructors Constructor Description OpenSSHKeyFile()
-
Method Summary
-
Methods inherited from class net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile
readKeyPair, toString
-
Methods inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
getPrivate, getType, init, init, init, init
-
-
-
-
Method Detail
-
getPublic
public java.security.PublicKey getPublic() throws java.io.IOException- Specified by:
getPublicin interfaceKeyProvider- Overrides:
getPublicin classBaseFileKeyProvider- Returns:
- the public key.
- Throws:
java.io.IOException- if there is an I/O error retrieving the public key
-
init
public void init(java.io.File location)
- Specified by:
initin interfaceFileKeyProvider- Overrides:
initin classBaseFileKeyProvider
-
init
public void init(java.lang.String privateKey, java.lang.String publicKey)- Specified by:
initin interfaceFileKeyProvider- Overrides:
initin classBaseFileKeyProvider
-
-