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
public class PKCS8KeyFile extends BaseFileKeyProvider
Key File implementation supporting PEM-encoded PKCS8 and PKCS1 formats with or without password-based encryption
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PKCS8KeyFile.Factory
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
protected KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo>
privateKeyInfoKeyPairConverter
-
Fields inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
kp, pwdf, resource, type
-
-
Constructor Summary
Constructors Constructor Description PKCS8KeyFile()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private org.bouncycastle.openssl.PEMKeyPair
readEncryptedKeyPair(org.bouncycastle.openssl.PEMEncryptedKeyPair encryptedKeyPair)
private org.bouncycastle.asn1.pkcs.PrivateKeyInfo
readEncryptedPrivateKeyInfo(org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo encryptedPrivateKeyInfo)
protected java.security.KeyPair
readKeyPair()
java.lang.String
toString()
-
-
-
Field Detail
-
log
protected final org.slf4j.Logger log
-
privateKeyInfoKeyPairConverter
protected KeyPairConverter<org.bouncycastle.asn1.pkcs.PrivateKeyInfo> privateKeyInfoKeyPairConverter
-
-
Method Detail
-
readKeyPair
protected java.security.KeyPair readKeyPair() throws java.io.IOException
- Specified by:
readKeyPair
in classBaseFileKeyProvider
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
readEncryptedKeyPair
private org.bouncycastle.openssl.PEMKeyPair readEncryptedKeyPair(org.bouncycastle.openssl.PEMEncryptedKeyPair encryptedKeyPair) throws java.io.IOException
- Throws:
java.io.IOException
-
readEncryptedPrivateKeyInfo
private org.bouncycastle.asn1.pkcs.PrivateKeyInfo readEncryptedPrivateKeyInfo(org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo encryptedPrivateKeyInfo) throws org.bouncycastle.openssl.EncryptionException
- Throws:
org.bouncycastle.openssl.EncryptionException
-
-