java.io.IOException: HTTPS hostname wrong: should be
<1company.mydomain.com>
The hostname in the HTTPS request is exactly as same as in the
certificate. And I can open up the hostname using an IE browser
without any problem. I know how to skip the hostname verification, but
I don't feel comfortable to do that.
Any thoughts? I notice the hostname starting with a digit. It is rare.
Can that cause any problem in Java?
Thanks
Albert
java.io.IOException: HTTPS hostname wrong: should be
<1company.mydomain.com>
at sun.net.www.protocol.https.HttpsClient.b(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:574)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(DashoA6275)
at java.net.URL.openStream(URL.java:960)
Thanks
Albert
"VK" <school...@yahoo.com> wrote in message news:<3fd796b0$0$17067$9b62...@news.freenet.de>...
> java.io.IOException: HTTPS hostname wrong: should be
> <1company.mydomain.com>
Examine the SSL server certificate to see what it says there.
Regards
JK
The hostname starts with a digit. It is rare. Could that cause problem
for JDK1.4.1_02?
And where can I download the source code for
sun.net.www.protocol.https.HttpsClint? I don't find it in
java.sun.com. I want to use a visual debugger to debug the error.
Thanks
Albert
JK <nob...@nowhere.org> wrote in message news:<brc0td$unm$1...@nathan.rz.tu-harburg.de>...
when you want to connect via
The source code of Sun's SSL classes is not open, I think due to the US
export regulations.
Regards
JK.
Albert wrote:
> Do you mean subject CN? I use the "keytool -printcert" command to show
> the detail of the cert. The hostname is displayed as the value of CN.
> There is no uppercase letter in the hostname.
>
> The hostname starts with a digit. It is rare. Could that cause problem
> for JDK1.4.1_02?
>
> And where can I download the source code for
> sun.net.www.protocol.https.HttpsClint? I don't find it in
> java.sun.com. I want to use a visual debugger to debug the error.
>
> Thanks
> Albert
>
<snipped>
Thanks
Albert
JK <nob...@nowhere.org> wrote in message news:<brmjmh$3c0$1...@nathan.rz.tu-harburg.de>...
There is a known error with this IOException: the host names are
mixed so that the exception always(?) prints the CN of the cert you're
trying to use, not the one you're connecting to, so you will seldom
be able to get a good error message.
The error is probably elsewhere. How did you create this server
certificate? Does it have unusual/bad OIDs?
-Hans
-Albert