Hi there,
had the same problem yesterday with my openhab Docker-Container in Unraid.
The Problem was the limited crypto.policy for java.
You can test the current policies yourself this way:
https://www.jvmhost.com/articles/jce-unlimited-cipher-policy-different-jdk-versions/
Create new File CipherTest.java:
cat > CipherTest.java<<EOF
import javax.crypto.Cipher;
class CipherTest {
public static void main(String[] args) {
try {
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
System.out.println("Max AES key length = " + maxKeyLen);
} catch (Exception e){
System.out.println("FAILED: No AES found!");
}
}
}
EOF
Then run:
javac CipherTest.java
and then run:
java CipherTest
Typical value for weak cipher policy is 128. Maximum value is 2147483647 and it confirms unlimited cipher strength policy.
In my installation i had only 128 and did the following:
I took the file /usr/lib/jvm/default-jvm/conf/security/java.security out of the Container as template and edited the java.security to “crypto.policy=unlimited”. Put it to a known Location in my host filesystem and mounted in the Container:
Host: /mnt/user/appdata/openhab2/java.security
Mountpoint in the container: /usr/lib/jvm/default-jvm/conf/security/java.security
After that i tested it again and the value was 2147483647 and the binding works.