终极解决方案:java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
报错信息
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
原因:
JDK7/8后添加了安全机制,导致这个问题出现
解决方案:
方案一:
把$JAVA_HOME/jre/lib/security/java.security 文件里的jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048,改成jdk.certpath.disabledAlgorithms=,去掉 "MD2, DSA, RSA keySize < 2048"
方案二:方案一没有用再用方案二
把$JAVA_HOME/jre/lib/security/java.security 文件里
jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768
改为
jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
jdk.tls.disabledAlgorithms=SSLv3, RC4, DH keySize < 768
终极解决方案:java.security.cert.CertificateException: Certificates does not conform to algorithm constraints的更多相关文章
- 解決 java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
找到 jre/lib/security/java.security 将 jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 ...
- Java_解决java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
找到 jre/lib/security/java.security 将 jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048 ...
- Certificates does not conform to algorithm constraints
今天在开发时遇到一个新问题:Certificates does not conform to algorithm constraints,在此记录一下解决方案. 问题详情: [ERROR] Faile ...
- HttpClient设置忽略SSL,实现HTTPS访问, 解决Certificates does not conform to algorithm constraints
话不多说,直接上代码. 测试API: https://api.k780.com/?app=life.time&appkey=10003&sign=b59bc3ef6191eb9f7 ...
- JAVA 调用https接口, java.security.cert.CertificateException
package com.easycare.store.util; import java.security.cert.CertificateException; import java.securit ...
- java.security.cert.CertificateException: No subject alternative names present
背景:在开发一个项目中,要调用一个webservice服务,之前设置的是http协议,项目中采用jdk自带的wsimport工具生成的客户端代码; 后来,需求变更要求兼容https协议的webserv ...
- 在ssm框架测试中解决javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException
在单元测试发现causeBy:javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException 经发现是db.p ...
- java.security.cert.CertificateException: No subject alternative names matching IP address xxx.xxx.xxx.xxx found
https与http不同的是,https加密,需要验证证书,而http不需要. 在连接的代码中加上: static { disableSslVerification(); } private stat ...
- 解决 java.security.cert.CertificateException: java.lang.IllegalArgumentException: Invalid input to toASCII:
使用 okhttp3 ,请求 一个 https 网站报错 , 类似这种 https://test_test.test.com , 百度不到问题 所以我写了这篇 给中文世界贡献一下如何解决 还是要学好英 ...
随机推荐
- IOS 设置文件是否使用ARC
全项目设置:Building Settings修改Objective-C Automatic Reference Counting设置是否使用 单文件设置:Build Phases-Compile S ...
- 安装新的int 9中断例程
body, table{font-family: 微软雅黑; font-size: 13.5pt} table{border-collapse: collapse; border: solid gra ...
- MongoDB投影有$slice如何只显示该字段
简单的投影 稍微用过MongoDB的都知道,投影很简单,就直接 db.student.find({_id:ObjectId('5a5085aed8f10c1a6cc0395b')},{comments ...
- HTML5图形绘制
要在HTML5中绘制图形,首先要放置一个canvas元素 <canvas id="canvas" width="400" height="300 ...
- 【转载】Linux时间相关结构与函数
1 时间的获取 在程序当中, 我们经常要输出系统当前的时间,比如日志文件中的每一个事件都要记录其产生时间.在 C 语言中获取当前时间的方法有以下几种,它们所获得的时间精度从秒级到纳秒,各有所不同. 表 ...
- matlab判断文件或文件夹是否存在
当前目录中包含以下文件及文件夹: startup.m win64/ … 判断当前目录中是否存在startup.m文件 if ~exist('startup.m','file')==0 error ...
- C# 取值函数
C# 中取绝对值的函数 System.Math.Abs(float value); System.Math.Abs(decimal value);System.Math.Abs(int value); ...
- shell获取字符串长度
方法1: 使用wc -L命令 wc -L可以获取到当前行的长度,因此对于单独行的字符串可以用这个简单的方法获取,另外wc -l则是获取当前字符串内容的行数. 代码如下: echo "abc& ...
- (转载)用VS2012或VS2013在win7下编写的程序在XP下运行就出现“不是有效的win32应用程序“
原文地址:http://www.vcerror.com/?p=1483 问题描述: 用VC2013编译了一个程序,在Windows 8.Windows 7(64位.32位)下都能正常运行.但在Win ...
- 使用hexo搭建个人博客
安装前提 node.js git 如果缺少以上条件,则前往相应的官网下载安装即可.. 安装hexo $ npm install hexo-cli -g 待安装完成后,执行相关命令查看hexo的信息. ...