gualizoe
gualizoe

Reputation: 159

Crypto policy unlimited ignored by JBoss

While trying to encrypt some data using jasypt, I run across the exception below:

org.jasypt.exceptions.EncryptionOperationNotPossibleException: Encryption raised an exception. A possible cause is you are using strong encryption algorithms and you have not installed the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in this Java Virtual Machine

I found a couple of questions so I fixed the issue by setting the crypto.policy property to unlimited in my code:

Security.setProperty("crypto.policy", "unlimited");

I deployed the war in a JBoss in my machine, and it works. But then we tried to install it in a different environment (not managed entirely by us), and it seems to somehow ignore the property (I have some logs to show its value, and I can see that the value is ok right before the encryption), because we're still getting the same error.

So, my question is: what can possibly be configured in JBoss to get that property ignored, even when changed programmatically?

We've checked the Java version in that environment and it's "1.8.0_152", so we think it should be ok. What are we missing?

Upvotes: 3

Views: 975

Answers (1)

S.Jose
S.Jose

Reputation: 439

what error you are getting? if you are getting the exception mentioned above that may be due to the fact that you haven't installed Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files in the new environment. You can check what JCE in your machine and in the new environment.

Upvotes: 1

Related Questions