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

Error EncryptionException #10

Closed
samsaga2 opened this issue Dec 4, 2015 · 4 comments
Closed

Error EncryptionException #10

samsaga2 opened this issue Dec 4, 2015 · 4 comments

Comments

@samsaga2
Copy link

samsaga2 commented Dec 4, 2015

This works ok on Linux but fails on Windows and I don't know why:

(def privkey (keys/private-key "privkey.pem" "superpass"))

The privkey file is the same and it seems to be ok.

java.lang.ExceptionInInitializerError
        at clojure.main.<clinit>(main.java:20)
Caused by: org.bouncycastle.openssl.EncryptionException: exception using cipher
- please check password and data., compiling:(backend.clj:17:14)
        at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3628)
        at clojure.lang.Compiler$DefExpr.eval(Compiler.java:439)
        at clojure.lang.Compiler.eval(Compiler.java:6787)
        at clojure.lang.Compiler.load(Compiler.java:7227)
        at clojure.lang.RT.loadResourceScript(RT.java:371)
        at clojure.lang.RT.loadResourceScript(RT.java:362)
        at clojure.lang.RT.load(RT.java:446)
        at clojure.lang.RT.load(RT.java:412)
        at clojure.core$load$fn__5448.invoke(core.clj:5866)
        at clojure.core$load.doInvoke(core.clj:5865)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5671)
        at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
        at clojure.core$load_lib.doInvoke(core.clj:5710)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$load_libs.doInvoke(core.clj:5749)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$require.doInvoke(core.clj:5832)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at appweb_api.controllers.auth$eval20083$loading__5340__auto____2008
.invoke(auth.clj:1)
@niwinz
Copy link
Member

niwinz commented Dec 4, 2015

I'm not windows user so lamentably I can't help much here. Maybe is related on path? windows uses different path separators and its directories/files are caseinsensitve... I don't know...

@samsaga2
Copy link
Author

samsaga2 commented Dec 4, 2015

The path is ok. I think it can be a bouncycastle bug.

@niwinz
Copy link
Member

niwinz commented Dec 9, 2015

Maybe as workaround you can build keys from strings. (see #11, I'll release new version soon with that chage).

@niwinz niwinz closed this as completed Mar 1, 2016
@nrakochy
Copy link

nrakochy commented Dec 9, 2016

I ran into this as well, and turns out that I need to update my Java security policy to allow for unlimited strength keys.

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

3 participants