Java and Old Hash Algorithms
David, one of our readers, emailed wih a question - when he tries to interact with a particular print driver, he gets a Java error:
PKIX path validation failed:
java.security.cert.CertPathValidatorException:
Algorithm constraints check failed: MD2withRSA
This error comes up because as of Java 7, MD2 hashing and any RSA hash under 1024 bits are disabled. Since this is a (very) old printer driver, the fact that it still uses MD2 is not a surprise - but what to do next?
OK - the obvious answer is to upgrade out of the problem - if the driver has an update, apply it. But how do we get to the interface given the Java situation? The answer is buried in the Java config files - - edit the file java.securty, which in Windows is found at: "C:\Program Files (x86)\Java\jre7\lib\security"
In this file, you'll find the line:
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
Edit or comment out this line, and MD2 will work for you again. But don't leave it like this - this enables all those certs with weak hashes, which leaves you open to a world of hurt. In this case, it gets you access back to the interface so you can upgrade to a newer version. If there is no newer version, it gives you access until you can upgrade the hardware or app that's causing the problem.
===============
Rob VandenBrink
Metafore
Comments
I'd like to see Oracle add the ability to trust particular JAR files based on a modern hash of the JAR itself. So if an enterprise or consumer has old printers or some other firmware-centric equipment they don't want to replace, they could add trusted for the embedded Java code without disabling strong signature checks in general. Would be handy for trusted unsigned Java as well. My experience is that most old Java (including this printer) will run fine with the latest Java 7 release.
However if Oracle did that, they would less able to collect on expensive Java 6 support contracts.
Anonymous
Sep 13th 2013
1 decade ago
Anonymous
Sep 13th 2013
1 decade ago
Check out: https://blogs.oracle.com/java-platform-group/entry/introducing_deployment_rule_sets
Does this do what you need?
Anonymous
Sep 13th 2013
1 decade ago
Bit of a pain though. Write an XML file of exceptions
and package it as a JAR file signed with a locally
trusted certificate--would take hours. I'll stick with
allowing MD2 cert hashes for now as I don't have
a population of click-happy non-technical users
to worry about.
Anonymous
Sep 13th 2013
1 decade ago
http://www.theregister.co.uk/2013/09/13/java_deployment_rule_set/
Anonymous
Sep 14th 2013
1 decade ago