tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh Kumar.T" <rameshku...@india.adventnet.com>
Subject Urgent!!!!!!!!
Date Fri, 04 Aug 2000 18:12:47 GMT

Hi,

        Iam trying to run an Apache server with SSL support and access
this server using JSSE.

        I have installed the following components in my RedHat5.2
Machine

        apache-1.3.12 + mod_ssl-2.6.5-1.3.12 + openssl-0.9.5a. I
followed the installations instructions
given in the modssl web-site and installed them and when i connected to
it via Netscape iam able to
get the It-Worked ! page.

        Then i tried to connect to this SSL server from a sample program
for JSSE, which is below

import java.io.*;
import java.net.*;
import java.security.Security;
import javax.net.ssl.*;

public class PrintSession {
    public static void main(String[] args) throws
        IOException {
            // Connect to the web server.
            Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());
            SSLSocket s =
                (SSLSocket)SSLSocketFactory.getDefault().
                createSocket(args[0], Integer.parseInt(args[1]));

            // What's the cipher suite?
            System.out.println(s.getSession().getCipherSuite());

            // Clean up.
            s.close();
        }
}
~
And i get the following output:

    SSL_NULL_WITH_NULL_NULL

But when i try to connect to some site like www.sun.com:443

iam getting a proper response like

SSL_RSA_EXPORT_WITH_RC4_40_MD5

iam getting the same error when it is using RSA or DSA(not possible to
connect thru Netscape). And
even i downloaded rsaref20.tar.Z and installed everything fresh iam
facing the same problem.

And in the Apache logs i get these message after each request

in error_log

[Fri Aug  4 11:09:27 2000] [error] mod_ssl: SSL handshake failed (server

krishnan.ramana.india.adventnet.com:8443, client 192.168.5.8) (OpenSSL
library error follows)
[Fri Aug  4 11:09:27 2000] [error] OpenSSL: error:14094416::lib(20)
:func(148) :reason(1046)

 in ssl_engine_log

[04/Aug/2000 11:09:26 10481] [info]  Connection to child 7 established
(server
krishnan.ramana.india.adventnet.com:8443, client 192.168.5.8)
[04/Aug/2000 11:09:26 10481] [info]  Seeding PRNG with 1160 bytes of
entropy
[04/Aug/2000 11:09:27 10481] [error] SSL handshake failed (server
krishnan.ramana.india.adventnet.com:8443, client 192.168.5.8) (OpenSSL
library error follows)
[04/Aug/2000 11:09:27 10481] [error] OpenSSL: error:14094416::lib(20)
:func(148) :reason(1046)

When i use the following program which does a HandShake

import java.io.*;
import java.net.*;
import java.security.Security;
import javax.net.ssl.*;

public class HandShake {
    public static void main(String[] args) throws
        IOException {
            Security.addProvider(new
com.sun.net.ssl.internal.ssl.Provider());              // Connect to the

web server.
            SSLSocket s =
                (SSLSocket)SSLSocketFactory.getDefault().
                createSocket("krishnan", 8443);
            // Add a handshake listener.
            s.addHandshakeCompletedListener(new
HandshakeCompletedListener() {
                    public void
handshakeCompleted(HandshakeCompletedEvent hce) {
                    System.out.println("Handshake:");
                    System.out.println("  " + hce.getCipherSuite());
                    }
                    });

            // Force the handshake.
            s.startHandshake();

            // Clean up.
            s.close();
        }
}


iam getting this exception:


Exception in thread "main" javax.net.ssl.SSLException: untrusted server
cert chain
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(Compiled Code)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.a(Compiled
Code)
        at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Compiled
Code)
        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(Compiled Code)
        at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Compiled Code)

        at HandShake.main(Compiled Code)


with the same logs,


Is there any help reference to interpret these error message codes
easily?


Thanks,

Sai.


Mime
View raw message