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
  • 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

      protected KeyPair readKeyPair() throws IOException
      Specified by:
      readKeyPair in class BaseFileKeyProvider
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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