- CA
了解 CA 签发的的过程,以及他的合法性
http://www.texnet.com.cn/help/cklc/618.html
CA 是如何 工作的?
http://technet.microsoft.com/en-us/library/cc737264.aspx
- Self-Signed
必须将 Self-Signed 的证书 加载 到 Trust Store 里面去
How the Self-Signed Cert be verified?
1. When you connect to a SSL server, java application asks the server to send its certificate
2. Client checks if the certificate is valid (like signature, validity date etc)
3. If step 2 validates successfully, java client validate if the issuer of the certificate can be trusted. This is where the trust store comes into picture. Java, by default, goes to <jre>/lib/security/cacerts file to see if the issuer can be accepted. If the (last) issuer is not found in that trust store, it throws exception.
As I did the step as the bold words said with FTPS and it's really not throw out the exception if I didn't import the certificate into the truststore, And we need to create a TrustManager by the self-signed certificate then hande shake with the server to verfify if the server is legal or fake.
4. In theory, to test your ssl application in test mode, you can add the server certificate (given by your admin) to the default cacerts (which is very very bad approach) or create a new trust store with that certificate and use that in your application (this is preferred approach)
5. Refer to http://exampledepot.com/egs/javax.net.ssl/Client.html which explains how to use your own keystore as TrustStore.
You can use keytool -import command to create a new keystore, by importing the certificate. Check out http://exampledepot.com/egs/java.security.cert/ImportCert.html
CA证书与Self-Signed证书详解
本文详细介绍了CA证书的签发过程及其合法性验证,并深入探讨了Self-Signed证书的工作原理。通过本文,读者可以了解到如何将Self-Signed证书添加到信任库中,以及Java应用程序如何验证此类证书。
2241

被折叠的 条评论
为什么被折叠?



