Class PKCS8KeyFile
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile
- All Implemented Interfaces:
FileKeyProvider
,KeyProvider
- Direct Known Subclasses:
OpenSSHKeyFile
Key File implementation supporting PEM-encoded PKCS8 and PKCS1 formats with or without password-based encryption
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Logger
protected KeyPairConverter
<org.bouncycastle.asn1.pkcs.PrivateKeyInfo> Fields inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
kp, pwdf, resource, type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.bouncycastle.openssl.PEMKeyPair
readEncryptedKeyPair
(org.bouncycastle.openssl.PEMEncryptedKeyPair encryptedKeyPair) private org.bouncycastle.asn1.pkcs.PrivateKeyInfo
readEncryptedPrivateKeyInfo
(org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo encryptedPrivateKeyInfo) protected KeyPair
toString()
-
Field Details
-
log
protected final org.slf4j.Logger log -
privateKeyInfoKeyPairConverter
protected KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo> privateKeyInfoKeyPairConverter
-
-
Constructor Details
-
PKCS8KeyFile
public PKCS8KeyFile()
-
-
Method Details
-
readKeyPair
- Specified by:
readKeyPair
in classBaseFileKeyProvider
- Throws:
IOException
-
toString
-
readEncryptedKeyPair
private org.bouncycastle.openssl.PEMKeyPair readEncryptedKeyPair(org.bouncycastle.openssl.PEMEncryptedKeyPair encryptedKeyPair) throws IOException - Throws:
IOException
-
readEncryptedPrivateKeyInfo
private org.bouncycastle.asn1.pkcs.PrivateKeyInfo readEncryptedPrivateKeyInfo(org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo encryptedPrivateKeyInfo) throws org.bouncycastle.openssl.EncryptionException - Throws:
org.bouncycastle.openssl.EncryptionException
-