tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Ă˜dell - Wapportal.se <tobias.od...@wapportal.se>
Subject RE: Tomcat 3.2.1 Standalone, JSSE 1.0.2 and Socket ERROR
Date Thu, 01 Feb 2001 12:15:59 GMT
I have the same problem as you!
I've also tried the the URL with setting,
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.ww
w.protocol");

I get the same error from both test and it is:
Tomcat server says:
2001-02-01 01:15:20 - Ctx(  ): IOException in: R( /) Received fatal alert:
certificate_unknown

Client app says:
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([DashoPro-V1.2-
120198]) 	at
com.sun.net.ssl.internal.ssl.Handshaker.process_record([DashoPro-V1.2-120198
]) 	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198]) 	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198]) 	at
com.sun.net.ssl.internal.ssl.AppOutputStream.write([DashoPro-V1.2-120198])
at java.io.OutputStream.write(OutputStream.java:65) 	at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V1.2-120
198]) 	at untitled1.SSLTest.handshake(SSLTest.java, Compiled Code) 	at
untitled1.SSLTest.<init>(SSLTest.java:17) 	at
untitled1.SSLTest.main(SSLTest.java:109) 


Anyone that can explain this to me?
I guess that the problem is that if not using a trusted CA server, but is
there a workarond when developing?

--Tobias--

-----Original Message-----
From: Valentin Sanchez [mailto:valen@labein.es]
Sent: Friday, January 05, 2001 11:27 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 3.2.1 Standalone, JSSE 1.0.2 and Socket ERROR


I am trying to use Tomcat 3.2.1 standalone compiled with SSL support and
Jsse 1.0.2
I hava configured Tomcat to use port 443 with SSL and it works fine using a
browser.

If I use "http://myserver/mypage.html" it do not use ssl
If I use "https://myserver/mypage.html" it uses ssl.

Now I m using jsse to open a secure socket connection to get the same page.
The code is as follows:
***************************************************************************
********
SSLSocket socket =
                (SSLSocket)factory.createSocket("myserver", 443);
 socket.startHandshake();

 PrintWriter out = new PrintWriter(
                      new BufferedWriter(
                      new OutputStreamWriter(
                           socket.getOutputStream())));

out.println("GET http://myserver/mypage.html HTTP/1.0");
out.println();
out.flush();
if (out.checkError())
          System.out.println(
              "SSLSocketClient:  java.io.PrintWriter error");

/* read response */
BufferedReader in = new BufferedReader(
         new InputStreamReader(
         socket.getInputStream()));

String inputLine;
 while ((inputLine = in.readLine()) != null)
     System.out.println(inputLine);

 in.close();
out.close();
socket.close();
***************************************************************************
*************
The code is copied from the Jsse examples.
Tomcat returns an error: Request not found and the execption in Tomcat is:
java.io.exception  Name of file,directory or volume label is not valid.

The same code works fine with www.verisign.com/index.html.
It also works with a server using IIS4.0.

Thanks in advance,
Valen



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message