Skip to content

Commit 9466c3d

Browse files
authored
Update JSch to latest 0.2.11 version (#70)
- Updates JSch to latest 0.2.11 version - Updates Release Notes with jsch changes - Updates README for latest version of clj-ssh
1 parent eaaf3dc commit 9466c3d

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# clj-ssh
77

8-
SSH in clojure. Uses jsch.
8+
SSH in clojure. Uses [jsch](https://github.com/mwiede/jsch).
99
(See section RSA Private Key format if using openssl generated keys)
1010

1111
## Usage
@@ -205,7 +205,7 @@ Thanks to [Ryan Stradling](http://github.com/rstradling) for these.
205205
Via [clojars](http://clojars.org) and
206206
[Leiningen](http://github.com/technomancy/leiningen).
207207

208-
:dependencies [clj-ssh "0.5.14"]
208+
:dependencies [org.clj-commons/clj-ssh "0.6.2"]
209209

210210
or your favourite maven repository aware tool.
211211

ReleaseNotes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.6.3
2+
3+
- Moved jsch to version 0.2.11
4+
5+
## 0.6.2
6+
7+
- Moved jsch to supported fork from com.github.mwiede/jsch version 0.2.9
8+
19
## 0.5.16
210

311
- Moved jsch to version 0.1.55

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
:dependencies [[org.clojure/tools.logging "1.2.4"
1313
:exclusions [org.clojure/clojure]]
14-
[com.github.mwiede/jsch "0.2.9"]
14+
[com.github.mwiede/jsch "0.2.11"]
1515
[net.java.dev.jna/jna "5.13.0"]
1616
[com.kohlschutter.junixsocket/junixsocket-core "2.6.2" :extension "pom"]]
1717
:jvm-opts ["-Djava.awt.headless=true"]

src/clj_ssh/ssh.clj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@
162162
encrypted."
163163
[^JSch agent ^String private-key-path ^String public-key-path]
164164
(logging/tracef "Make identity %s %s" private-key-path public-key-path)
165-
(reflect/call-method
166-
com.jcraft.jsch.IdentityFile 'newInstance [String String JSch]
167-
nil private-key-path public-key-path agent))
165+
(.addIdentity agent private-key-path public-key-path nil)
166+
(.lastElement (.getIdentities (.getIdentityRepository agent))))
168167

169168
(defn ^KeyPair keypair
170169
"Return a KeyPair object for the given options.
@@ -238,7 +237,7 @@
238237
(^bytes getSignature [_ ^bytes data] (.. kpair (getSignature data)))
239238
(^bytes getSignature [_ ^bytes data ^String alg] (.. kpair (getSignature data alg)))
240239
(getAlgName [_]
241-
(String. (reflect/call-method KeyPair 'getKeyTypeName [] kpair)))
240+
(.getKeyTypeString kpair))
242241
(getName [_] identity)
243242
(isEncrypted [_] (.. kpair isEncrypted))
244243
(clear [_] (.. kpair dispose)))

0 commit comments

Comments
 (0)