This content has been marked as final. Show 5 replies
It appears an IoException is thrown: java.io.IOException: Server returned HTTP response code: 403 for URL: https://domain.comThat proves that your SSL/TLS is working perfectly. That 403 came to you via SSL.
Does anyone know why this might be happening and what if anything is missing?What is missing is that you don't have permission to access that part of the site. Nothing to do with SSL/TLS or missing JAR files whatsoever. It is access control at the website.
Possibly you need to authenticate to the website, in which case you should look into java.net.Authenticator.
Please try this;
1. Open FireFox browser and try to access the secured URL (i mean https://domain.com)
2. To the left side of the Address bar a colored button (blue/green) will appear. Click on it to view the certificate details.
If you are able to view the certificate info, then it means your java code should be able to receive and accept the certificate sent by server. I guess you are missing this part.
I guess you are missing this part.No, you are missing the part where it has already been pointed out that his SSL connection is working perfectly, certificate and all.
Please read the thread before you answer.
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");Why are you doing these two steps? These haven't been necessary since JSSE was added to the JDK in 1.4.0 back in 2002.
What java tools should I be using to get more information on why this is not working?Use the JSSE debug output and you'll likely see that the connection is made and the HTTP traffic is flowing.
I can compile the code shown above but that 403 error and IoException are very troubling!
See the JSSE Reference Guide for your release details.
He will definitely* see that. Otherwise he couldn't have got the HTTP error code. So actually the procedure is a waste of time in this case.