From 9bc0c22d7d8b36435ee1da918a1f0cdac1d58ad5 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Thu, 8 Oct 2015 09:51:39 -0700 Subject: Add mentions of EC keys where DSA and RSA are mentioned EC keys have been supported by this library for a while, so the documentation should be updated to reflect that fact. --- .../java/com/trilead/ssh2/AuthAgentCallback.java | 6 +++--- .../src/main/java/com/trilead/ssh2/Connection.java | 23 +++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/sshlib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java b/sshlib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java index 96f2d07..17dcbb4 100644 --- a/sshlib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java +++ b/sshlib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java @@ -17,9 +17,9 @@ public interface AuthAgentCallback { Map retrieveIdentities(); /** - * @param pair A RSAPrivateKey or DSAPrivateKey - * containing a DSA or RSA private key of - * the user in Trilead object format. + * @param pair A RSAPrivateKey, ECPrivateKey, or + * DSAPrivateKey containing a DSA, EC, or RSA private + * and corresponding PublicKey. * @param comment comment associated with this key * @param confirmUse whether to prompt before using this key * @param lifetime lifetime in seconds for key to be remembered diff --git a/sshlib/src/main/java/com/trilead/ssh2/Connection.java b/sshlib/src/main/java/com/trilead/ssh2/Connection.java index 61d2f1b..2e31a8a 100644 --- a/sshlib/src/main/java/com/trilead/ssh2/Connection.java +++ b/sshlib/src/main/java/com/trilead/ssh2/Connection.java @@ -382,8 +382,8 @@ public class Connection /** * After a successful connect, one has to authenticate oneself. The * authentication method "publickey" works by signing a challenge sent by - * the server. The signature is either DSA or RSA based - it just depends on - * the type of private key you specify, either a DSA or RSA private key in + * the server. The signature is either DSA, EC, or RSA based - it just depends + * on the type of private key you specify, either a DSA or RSA private key in * PEM format. And yes, this is may seem to be a little confusing, the * method is called "publickey" in the SSH-2 protocol specification, however * since we need to generate a signature, you actually have to supply a @@ -452,9 +452,9 @@ public class Connection /** * After a successful connect, one has to authenticate oneself. The * authentication method "publickey" works by signing a challenge sent by - * the server. The signature is either DSA or RSA based - it just depends on - * the type of private key you specify, either a DSA or RSA private key in - * PEM format. And yes, this is may seem to be a little confusing, the + * the server. The signature is either DSA, EC, or RSA based - it just depends + * on the type of private key you specify, either a DSA, EC, or RSA private key + * in PEM format. And yes, this is may seem to be a little confusing, the * method is called "publickey" in the SSH-2 protocol specification, however * since we need to generate a signature, you actually have to supply a * private key =). @@ -469,9 +469,9 @@ public class Connection * @param user * A String holding the username. * @param pair - * A RSAPrivateKey or DSAPrivateKey - * containing a DSA or RSA private key of - * the user in Trilead object format. + * A KeyPair containing a RSAPrivateKey, + * DSAPrivateKey, or ECPrivateKey and + * corresponding PublicKey. * * @return whether the connection is now authenticated. * @throws IOException @@ -503,7 +503,7 @@ public class Connection } /** * A convenience wrapper function which reads in a private key (PEM format, - * either DSA or RSA) and then calls + * either DSA, EC, or RSA) and then calls * authenticateWithPublicKey(String, char[], String). *

* NOTE PUTTY USERS: Event though your key file may start with @@ -516,8 +516,9 @@ public class Connection * A String holding the username. * @param pemFile * A File object pointing to a file containing a - * DSA or RSA private key of the user in OpenSSH key format (PEM, - * you can't miss the "-----BEGIN DSA PRIVATE KEY-----" or + * DSA, EC, or RSA private key of the user in OpenSSH key format + * (PEM, you can't miss the "-----BEGIN DSA PRIVATE KEY-----", + * "-----BEGIN EC PRIVATE KEY-----", or * "-----BEGIN RSA PRIVATE KEY-----" tag). * @param password * If the PEM file is encrypted then you must specify the -- cgit v1.2.3