The HttpURLConnection does not support the HTTPS protocol (the ability to
use RSA encryption algorithms requires that somebody pay RSA licensing
fees.)
There aren't any free (and legal) solutions.
-----Original Message-----
From: Pinghua Young [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 11, 1999 9:08 PM
To: [EMAIL PROTECTED]
Subject: Anyone done https inside a servlet?
Has anyone successfully opened a HTTPS url connection to a web site,
and retrieved its content from within a servlet?
I am trying to use Sun's early access JSSE package, but I am having
trouble getting it to work.
Here's the exception I got:
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:983)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198
])
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPr
o-V1.2-120198])
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Compiled
Code)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Compiled Code)
at java.io.OutputStream.write(OutputStream.java:65)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V
1.2-120198])
at
com.sun.net.ssl.internal.www.https.HttpsClient.doConnect([DashoPro-V1
.2-120198])
at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:265)
at
com.sun.net.ssl.internal.www.https.HttpsClient.<init>([DashoPro-V1.2-
120198])
at
com.sun.net.ssl.internal.www.https.HttpsClient.New([DashoPro-V1.2-120
198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
t([DashoPro-V1.2-120198])
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Compiled C
ode)
at HttpsTest.main(Compiled Code)
javax.net.ssl.SSLException: untrusted server cert chain
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198
])
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPr
o-V1.2-120198])
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Compiled
Code)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Compiled Code)
at java.io.OutputStream.write(OutputStream.java:65)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V
1.2-120198])
at
com.sun.net.ssl.internal.www.https.HttpsClient.doConnect([DashoPro-V1
.2-120198])
at sun.net.www.http.HttpClient.openServer(HttpClient.java:320)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:260)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:265)
at
com.sun.net.ssl.internal.www.https.HttpsClient.<init>([DashoPro-V1.2-
120198])
at
com.sun.net.ssl.internal.www.https.HttpsClient.New([DashoPro-V1.2-120
198])
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connec
t([DashoPro-V1.2-120198])
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(Compiled C
ode)
at HttpsTest.main(Compiled Code)
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html