garydgregory commented on a change in pull request #60: VFS-609: VFS SFTP 
doesn't support a private key as byte array
URL: https://github.com/apache/commons-vfs/pull/60#discussion_r278896592
 
 

 ##########
 File path: 
commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java
 ##########
 @@ -69,6 +71,43 @@ public IdentityInfo(final File privateKey, final File 
publicKey, final byte[] pa
         this.privateKey = privateKey;
         this.publicKey = publicKey;
         this.passPhrase = passPhrase;
+        this.privateKeyBytes = null;
+        this.publicKeyBytes = null;
+    }
+
+
+    /**
+     * Constructs an identity info with private and public key and passphrase 
for the private key.
+     * <p>
+     *
+     * @param privateKey Private key bytes
+     * @param publicKey The public key part used for connections with exchange 
of certificates (can be {@code null})
+     * @param passPhrase The passphrase to decrypt the private key (can be 
{@code null} if no passphrase is used)
+     * @since 2.1
+     */
+    public IdentityInfo(final byte[] privateKey, final byte[] publicKey, final 
byte[] passPhrase)
+    {
+        this.privateKey = null;
+        this.publicKey = null;
+        this.privateKeyBytes = privateKey;
+        this.publicKeyBytes = publicKey;
+        this.passPhrase = passPhrase;
+    }
+
+    /**
+     * Constructs an identity info with private and passphrase for the private 
key.
+     * <p>
 
 Review comment:
   See above.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to