问题描述
访问某网站时服务器报出Algorithm constraints check failed on signature algorithm: MD2withRSA
这是因为在进行SSL握手时,服务器所采用的ssl证书算法不符合某种约束条件而抛出异常!
问题分析:
1. 查询网站证书信息
openssl s_client -showcerts -connect hostname:443
VeriSign(威瑞信)公司根证书的签名算法是md2WithRSAEncryption!
2. 为什么使用md2WithRSAEncryption会出异常?
由于MD2被广泛认为是不安全的,JDK6u17版本开始,MD2算法被禁用。打开$JAVA_HOME/jre/lib/security/java.security文件可以看到
可以肯定,必定是代码中对算法做了校验引起的。