java.security.InvalidKeyException: Illegal key size or default parameters
来源:互联网 发布:泳道图 for mac 编辑:程序博客网 时间:2024/05/16 01:54
做CA认证 生成证书时候出错,后来发现是 秘钥长度太长了,怎么会有这个问题呢,看下面的:
参考网址 : http://open.eucalyptus.com/forum/illegal-key-size
http://ksgimi.iteye.com/blog/1584716
异常:
EjbcaException_Exception: exception encrypting data - java.security.InvalidKeyException: Illegal key size
分析:
这种限制是因为美国对软件出口的控制。
所以下载匹配的jce_policy ,替换jdk安装目录下 jdk1.* \jre\lib\security 中的 local_policy.jar 和 US_export_policy.jar 两个jar包。(不主要)
替换jdk安装目录下 jre* \lib\security 中的 local_policy.jar 和 US_export_policy.jar 两个jar包。(主要)
注 :* 是版本号
I was working on webservice call where my code was breaking in RAD during decrypting the password of keystore. I encountered below error:
Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA13*..) ~[na:1.6]
at javax.crypto.Cipher.a(DashoA13*..) ~[na:1.6]
at javax.crypto.Cipher.a(DashoA13*..) ~[na:1.6]
at javax.crypto.Cipher.init(DashoA13*..) ~[na:1.6]
at javax.crypto.Cipher.init(DashoA13*..) ~[na:1.6]
There are key size restrictions with the default crypto files local_policy.jar and US_export_policy.jar comes with JDK – which limits it to 128. If your security policy using a key size larger than this – then the above exception is thrown.
For example – if your security policy specifies the algorithmic suite as Basic256 – then the key size to be used is 256.
For the solution of above issue, you need to patch your JDK with Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
For JDK1.5 visit, download the crypto files and copy the two jar files from the extracted jce directory (local_policy.jar and US_export_policy.jar) to $JAVA_HOME/jre/lib/security.
For JDK1.6 visit
If your IDE using it’s own specific JDK then patch that as well with these files to resolve the issue.
- java.security.InvalidKeyException: Illegal key size or default parameters
- java.security.InvalidKeyException: Illegal key size or default parameters
- java.security.InvalidKeyException: Illegal key size or default parameters
- 异常:java.security.InvalidKeyException: Illegal key size or default parameters
- java.security.InvalidKeyException: Illegal key size or default parameters 异常
- AES加密时抛出java.security.InvalidKeyException: Illegal key size or default parameters
- AES加密时抛出java.security.InvalidKeyException: Illegal key size or default parameters .
- AES加密时抛出java.security.InvalidKeyException: Illegal key size or default parameters
- 错误:java.security.InvalidKeyException: Illegal key size or default parameters解决方法
- AES加密java.security.InvalidKeyException: Illegal key size or default parameters
- AES加密java.security.InvalidKeyException: Illegal key size or default parameters
- 错误:java.security.InvalidKeyException: Illegal key size or default parameters解决方法
- 加密时java.security.InvalidKeyException: Illegal key size or default parameters解决办法
- Linux解决java.security.InvalidKeyException: Illegal key size or default parameters
- 错误:java.security.InvalidKeyException: Illegal key size or default parameters解决方法
- Java Security: Illegal key size or default parameters
- AES加密时抛出java.security.InvalidKeyException: Illegal key size or default parameter
- AES的256位密钥加解密报 java.security.InvalidKeyException: Illegal key size or default parameters 异常的处理及处理工具
- include路径
- SharePoint Log分析 —— 找不到feature的xml文件
- Linux下图像压缩/裁剪尺寸等方法的简单说明
- SOA标准之SCA
- 弹出界面eth0:错误:激活连接失败:device not managed by NetworkManager
- java.security.InvalidKeyException: Illegal key size or default parameters
- HTML 易犯的语法错误
- json python api
- devexpress aspxhtmleditor 中的js和 ajax beforeSend冲突
- ViewHolder模式超简洁写法,很cool!
- 《神经网络设计》p81式6.7和式6.8详解
- 关于explicit的应用
- 应用商店审核指南(中文版)-感谢译言网 -中文版苹果官方应用审核标准
- 给div 只增加上边框内阴影