1. 程式人生 > 其它 >invalidalgorithmParamterExParameterException: Prime size must be multiple of 64 , and can only range

invalidalgorithmParamterExParameterException: Prime size must be multiple of 64 , and can only range

技術標籤:雜計jdkjava

在jdk1.7環境下發送https報錯

invalidalgorithmParamterExParameterException: Prime size must be multiple of 64 , and can only range from 512 to 1024

解決方案:
在jdk中完全禁用DHE,編輯jre / lib / security / java.security並確保禁用了DHE,例如
jdk.tls.disabledAlgorithms=SSLv3, DHE

具體的原理還需要花費時間去詳細瞭解,暫時特此記錄一下解決方案,也有一說可以升級到jdk8可以解決,暫時沒有驗證