Hi folks - I met some strange behaviour today using the clj-ssh library -
but it looks like it might not be the library's fault as such.
If I call (add-identity agent {:private-key-path "foo" :passphrase "bar"})
the clj-ssh library (eventually) calls a java method:
(.addIdentity agent "foo" "bar")
This method has several implementations, including:
public void addIdentity(java.lang.String prvkey, byte[] passphrase);
public void addIdentity(java.lang.String prvkey, java.lang.String
passphrase);
and for some reason this fails with
ClassCastException java.lang.String cannot be cast to [B
If instead I call:
(add-identity agent {:private-key-path "foo" :passphrase (.getBytes
"bar")})
then everything works.
I had thought Clojure would use reflection to find the right addIdentity
call - any idea why it isn't? Or am I misdiagnosing something somewhere?
- Korny
--
Kornelis Sietsma korny at my surname dot com http://korny.info
.fnord { display: none !important; }
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.