Class IdentityInfo

java.lang.Object
org.apache.commons.vfs2.provider.sftp.IdentityInfo

public class IdentityInfo extends Object
Structure for an identity.
Since:
2.1
  • Constructor Details

    • IdentityInfo

      public IdentityInfo(File privateKey)
      Constructs an identity info with private key.

      The key is not passphrase protected.

      We use java.io.File because JSch cannot deal with VFS FileObjects.

      Parameters:
      privateKey - The file with the private key
      Since:
      2.1
    • IdentityInfo

      public IdentityInfo(File privateKey, byte[] passPhrase)
      Constructs an identity info with private key and its passphrase.

      We use java.io.File because JSch cannot deal with VFS FileObjects.

      Parameters:
      privateKey - The file with the private key
      passPhrase - The passphrase to decrypt the private key (can be null if no passphrase is used)
      Since:
      2.1
    • IdentityInfo

      public IdentityInfo(File privateKey, File publicKey, byte[] passPhrase)
      Constructs an identity info with private and public key and passphrase for the private key.

      We use java.io.File because JSch cannot deal with VFS FileObjects.

      Parameters:
      privateKey - The file with the private key
      publicKey - The public key part used for connections with exchange of certificates (can be null)
      passPhrase - The passphrase to decrypt the private key (can be null if no passphrase is used)
      Since:
      2.1
  • Method Details

    • getPrivateKey

      public File getPrivateKey()
      Get the file with the private key.
      Returns:
      the file
      Since:
      2.1
    • getPublicKey

      public File getPublicKey()
      Get the file with the public key.
      Returns:
      the file
      Since:
      2.1
    • getPassPhrase

      public byte[] getPassPhrase()
      Get the passphrase of the private key.
      Returns:
      the passphrase
      Since:
      2.1