Hello,
 
I have installed a verisign certificate on the web browser under my
name. Upon sending a request from the Netscape web browser to
a certain java servlet, this certificate needs to be passed along with
this request.  I want to retrieve this certificate from the java servlet
where the request is going to, however, the certificate object in java
is null. I have 3 questions:
 
1. How can I make sure that the certificate is being sent with the request?
 
2. If the certificate is being sent with the request, is the process in which
to retrieve the certificate correct??
here is the java code sample that I am using:
 
        //need to get the certificate from the request.
        //if this certificate is in the database table for
        //a particular partner, then we accept this request.
       
        String cipherSuite = (String) req.getAttribute("javax.net.ssl.cipher_suite");
        Util.debug("Cipher Suite: " + cipherSuite);
       
        if (cipherSuite != null)
        {
            X509Certificate certChain[] =
            (X509Certificate[]) req.getAttribute("javax.net.ssl.peer_certificates");
            if (certChain != null)
            {
                for (int i=0; i< certChain.length; i++) {
                    Util.debug("Client Certificate [" + i + "] = " + certChain[i].toString());
                }
            }
        }
 
3. We are using apache web server and the httpd.conf is configured with:
 
SSLVerifyClient none
SSLCACertificatePath    /usr/local/apache/conf/ssl.crt
SSLCACertificateFile    /usr/local/apache/conf/ssl.crt/ca-bundle.crt
<Location /bin/ThirdPartyInterface>
SSLVerifyClient require
#SSLOptions +ExportCertData
#SSLOptions +FakeBasicAuth +ExportCertData
SSLVerifyDepth  10
</Location> 
 
 
Any feedback is greatly appreciated.
 
--suzan
 

Reply via email to