Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compact unsign throwing exceptions #35

Closed
KeeganMyers opened this issue Jun 23, 2016 · 1 comment
Closed

compact unsign throwing exceptions #35

KeeganMyers opened this issue Jun 23, 2016 · 1 comment

Comments

@KeeganMyers
Copy link

This is most likely due to errors in my configuration but each time I attempt to execute the following:

(require '[buddy.sign.compact :as cm])

(-> (cm/sign {:test "value"}
             ;priv-key
              {:alg :es256  :compress true})
(cm/unsign
    ;priv-key
    {:alg :es256  :compress true :max-age (* 15 60)}))

unsign throws the following exception

#error {
 :cause "No matching method found: initVerify for class java.security.Signature$Delegate"
 :via
 [{:type java.lang.IllegalArgumentException
   :message "No matching method found: initVerify for class java.security.Signature$Delegate"
   :at [clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 80]}]
 :trace
 [[clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 80]
  [clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 28]
  [buddy.core.dsa$eval24478$fn__24479 invoke "dsa.clj" 72]
  [buddy.core.dsa$eval24382$fn__24413$G__24369__24420 invoke "dsa.clj" 43]
  [buddy.core.dsa$verify invoke "dsa.clj" 161]
  [buddy.sign.compact$fn__25562 invoke "compact.clj" 73]
  [buddy.sign.compact$verify_signature invoke "compact.clj" 96]
  [buddy.sign.compact$unsign doInvoke "compact.clj" 139]
  [clojure.lang.RestFn invoke "RestFn.java" 442]

I have included the nippy dependency in build.boot
[com.taoensso/nippy "2.11.1"]

I have also tried :rs256 with a different key pair and seen similar results. Please let me know if you need additional information or if you have any pointers on this issue.

@KeeganMyers
Copy link
Author

Please disregard this issue. The problem was related to my key pairs being invalid. I removed all old keys and created new ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant