I've got 2 Servers running Apache with SSL and a valid cerificate. If you call the website, any browser works with SSL on both servers. Server one is a hosted one which was installed by IONOS. Server 2 is a VPS which I installed on my own.
When I call a php script via OKHttpUtils on Server 1 all is working well via SSL. Doing the same on Server 2 causes the PKIX error though browsers work like a charm. I've even installed the Server's certificate with InstallCert.jar. which is giving "javax.net.ssl.SSLPeerUnverifiedException: Hostname 217.xxx.xxx.xxx not verified:...."
Questions
1. Why does Java recognize Server 1's certificate "automatically"?
2. Why does one have to install the certificate via InstallCert.jar at all? (I thought it was handled via handshake?). This would mean that every website's certificate had to be installed manually? I can't think that this is meant to be that way.
PS: Will check Server 2 for issues but that doesn't explain why browsers work
When I call a php script via OKHttpUtils on Server 1 all is working well via SSL. Doing the same on Server 2 causes the PKIX error though browsers work like a charm. I've even installed the Server's certificate with InstallCert.jar. which is giving "javax.net.ssl.SSLPeerUnverifiedException: Hostname 217.xxx.xxx.xxx not verified:...."
Questions
1. Why does Java recognize Server 1's certificate "automatically"?
2. Why does one have to install the certificate via InstallCert.jar at all? (I thought it was handled via handshake?). This would mean that every website's certificate had to be installed manually? I can't think that this is meant to be that way.
PS: Will check Server 2 for issues but that doesn't explain why browsers work