Arrrggh! java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
Published Tue, 7 Aug 2012 • 35 comments
It seemed like a relatively simple task to automate a web transaction on a secure site using Selenium WebDriver and HtmlUnit, until I got this exception:
java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
After ages trying to figure out how to get around it, the solution is simple...
JDK7 changed the default Java security settings to disable MD2 algorithm to sign SSL certificates. BUT this can be re-enabled by editing JDK_HOME/jre/lib/security/java.security and commenting out the following line:
... becomes ...
Hope this helps someone else with the same issue!
About the Author
Richard Nichols is an Australian software engineer with a passion for making things.
You might also enjoy reading -
- Creating and importing an external certificate to SQL Server
- Face Detection in Java - Haar Cascade with JJIL (how-to)
- Thoughts on the Wordpress & Thesis GPL hoo-haa
- Useful shell scripts: nightly postgresql backup
- Where Does Wicket Store It's DiskPageStore Files?