Java CA key usage check failed: keyCertSign bit is not set

摘要:Java CA key usage check failed: keyCertSign bit is not set

 

Java CA key usage check failed: keyCertSign bit is not set

 

Server 從 Ubuntu 10 升級到 12.04時,Java 也從Sun Java 6 變成OpenSDK 

卻在呼叫遠端的https連線時,出現了以下錯誤。


此因在Windows上,並不會發生這個問題,

網路的解說,約是,升級的問題,或升級後發生的問題,或只有在Linux環境下會發生

或Java在這方面比較嚴謹。

 

而找了很多方法後,就是砍掉舊有的OpenSDK,裝新的sun java jdk 就解決了。


sun.security.validator.ValidatorException: 

PKIX path validation failed: java.security.cert.CertPathValidatorException: CA key usage check failed: keyCertSign bit is not set


 

http://www.gaggl.com/2012/04/installing-java6-jdk-on-ubuntu-12-04/


wget https://github.com/flexiondotorg/oab-java6/raw/0.2.1/oab-java6.sh -O oab-java6.sh

chmod +x oab-java6.sh

sudo ./oab-java6.sh


sudo apt-get purge sun-java


mkdir ~/src

cd ~/src

git clone https://github.com/flexiondotorg/oab-java6.git

cd ~/src/oab-java6

sudo ./oab-java.sh


sudo apt-get install sun-java6-plugin sun-java6-jre sun-java6-bin sun-java6-jdk


tail -f ~/src/oab-java6/oab-java.sh.log