I am trying to get my loxone binding to work but keep getting the same error (see subject).
When looking at the binding doc i see this.
Encryption AES-256 JRE must have unrestricted security policy configured
Because i am using openhasbian i am connected with putty but i can not find a way to enable java in putty. I am a total noob in linux so i probalby missed the correct way to find it.
Java is running but this would imply the latest version is not installed. The unrestricted policy for encryption is now enabled by default in v9 and latest versions of 6 - 8
Java 9: Any official release!
Java 8u161 or later (Available now)
Java 7u171 or later (Only available through ‘My Oracle Support’)
Java 6u181 or later
I can not find the files that need to be overwritten in the folder
[06:40:51] openhabian@openHABianPi:/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/security$ ls
blacklisted.certs cacerts java.policy java.security policy
So i went deeper and found this
[06:57:21] openhabian@openHABianPi:/usr/lib/jvm/zulu-embedded-8-armhf/jre/lib/security/policy/unlimited$ ls
local_policy.jar US_export_policy.jar
That are the files but they are red. (they are also red in the limited folder) And i also can not do the cp command to that file.
Please follow these instruction to update your java security policy files
I fixed by following instructions here suhothayan.blogspot.com 33
How to install Java Cryptography Extension (JCE) unlimited strength jurisdiction…
How to over come “org.apache.xml.security.encryption.XMLEncryptionException: Illegal key size or default parameters” or "java.security.Inv…
overwrote files in both JRE and JDK security settings, restarted Java and opehab and now connected.
You will need to copy into $JAVA_HOME/jre/lib/security/policy/unlimited
the files local_policy.jar and US_export_policy.jar
make sure you have read and excutable permission for all
i.e. use chmod a+rx local_policy.jar
I tried the last command
[06:48:18] openhabian@openHABianPi:/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/lib/security$ chmod a+rx local_policy.jar
chmod: changing permissions of ‘local_policy.jar’: Operation not permitted
I’d like to bring this thread back up, as I’m currently facing the same issue.
I’m running openHAB 4.3.5 in a Docker container (based on the “About” page, it’s using Java 17). From what I understand, Java versions from 9 onwards should include the Unlimited Cryptography Policy by default.
The links in the binding documentation related to this topic point to quite old posts that are not really of much help in this case.
Has anyone encountered this issue with the current Docker image? Or does anyone have suggestions on how to resolve it?
For additional context: my Miniserver is a Gen 2 and has the HTTPS interface enabled. As I understand it, the binding should not apply any additional encryption in this case. Could this be related to the error message I’m seeing?
I also looked for the webSocketType parameter in the current binding (Thing configuration), but couldn’t find it - even with advanced settings enabled.
I’ve verified the Java settings in the Docker container: there’s no override of the crypto policy, so it defaults to “unlimited.” This suggests something else might be causing the issue…
Edit:
I found the issue! The Docker container had the CRYPTO_POLICY environment variable set to limited. After changing it to unlimited, the connection started working. It appears this setting is part of the default openHAB Docker image.