MD5withRSA disabled in Java 1.8.0_131

Home » Java » MD5withRSA disabled in Java 1.8.0_131
Java, Keystore No Comments

Java 1.8.0_131 disabled MD5 algorithm. As a result, any server that has keystore based onĀ  this old algorithm will result in this error

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

More info:
https://www.oracle.com/technetwork/java/javase/8u131-relnotes-3565278.html

Current Payment Gateway keystore

>keytool -list -keystore keystore.bin -v
Enter keystore password:  

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: sportlogic
Creation date: 30/07/2009
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=SportLogic Admin, OU=Development, O=SportLogic, L=Unknown, ST=Unknown, C=AU
Issuer: CN=SportLogic Admin, OU=Development, O=SportLogic, L=Unknown, ST=Unknown, C=AU
Serial number: 4a70745b
Valid from: Thu Jul 30 02:10:03 AEST 2009 until: Sun Jul 28 02:10:03 AEST 2019
Certificate fingerprints:
	 MD5:  7A:92:5D:D0:5B:D4:A3:19:E8:97:32:A0:9B:23:02:85
	 SHA1: 33:BD:58:BF:DE:FA:FC:70:04:3C:C9:2A:13:C6:21:DF:F9:54:A3:B7
	 SHA256: 22:3C:78:E7:F3:93:7D:E9:F0:1F:C5:6A:6E:29:DB:9D:64:F4:D5:4D:A9:C6:11:07:2B:8A:38:F0:D5:E3:26:7A
	 Signature algorithm name: MD5withRSA
	 Version: 1

We use keystore from Java 1.8.0_131 to regenerate the keystore

>keytool -genkey -keystore keystore.bin -alias sportlogic -keyalg RSA -validity 3650

We get

...
Signature algorithm name: SHA256withRSA
Version: 3
...