From 4271e2ed172a016e9455f0e43b628a744907ce63 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Sun, 3 Feb 2013 19:00:31 -0800 Subject: Remove J2ME compatibility layer for keys Use JCE instead of the DIY crypto library that is in Trilead. This was apparently for J2ME devices. Well, I'm sorry, J2ME devices, you're dead to me. --- lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java') diff --git a/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java b/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java index c395198..7fe270b 100644 --- a/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java +++ b/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java @@ -1,5 +1,6 @@ package com.trilead.ssh2; +import java.security.KeyPair; import java.util.Map; /** @@ -24,7 +25,7 @@ public interface AuthAgentCallback { * @param lifetime lifetime in seconds for key to be remembered * @return success or failure */ - boolean addIdentity(Object key, String comment, boolean confirmUse, int lifetime); + boolean addIdentity(KeyPair pair, String comment, boolean confirmUse, int lifetime); /** * @param publicKey byte blob containing the OpenSSH-format encoded public key @@ -43,7 +44,7 @@ public interface AuthAgentCallback { * containing a DSA or RSA private key of * the user in Trilead object format. */ - Object getPrivateKey(byte[] publicKey); + KeyPair getKeyPair(byte[] publicKey); /** * @return -- cgit v1.2.3