Skip to content

Commit 76b6e36

Browse files
committed
Ensure literal key strings are handled correctly
1 parent fe3462f commit 76b6e36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/clj_ssh/ssh.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@
162162
private-key
163163
(let [^com.jcraft.jsch.IdentityRepository id-repo (id-repository)]
164164
(if (local-repo? id-repo)
165-
(.addIdentity agent name private-key public-key passphrase)
165+
(.addIdentity
166+
agent name (as-bytes private-key) (as-bytes public-key) passphrase)
166167
(let [^KeyPair keypair
167168
(KeyPair/load
168169
agent (as-bytes private-key) (as-bytes public-key))]

0 commit comments

Comments
 (0)