Hi,
I've installed Apache 2.0.48 on windows 2000 and have installed tomcat.
I've followed configuration as per the following website http://www.leafdigital.com/articles/jspinstall.html to
I've attached all the required files as mentioned in the link.
Other info
{
my directory setup is:
Apache c:/Program Files/Apache Group/Apache2
Tomcat c:/Program Files/Apache Software Foundation
My jsp files are in  c:/Program Files/Apache Group/Apache2/testLevelA
}
 
When i run my  https://localhost:443/testLevelA/GetA.jsp , the cert is always null.
i tried the following 2 methods in my GetA.jsp:-
Method A:
java.security.cert.X509Certificate[] cert = (java.security.cert.X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");
session.putValue("tmp", cert[0].getSubjectDN().toString());
the cert is empty
 
Method B:
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket sslsock = (SSLSocket)factory.createSocket("localhost",443);
SSLSession session1 = sslsock.getSession();
X509Certificate cert = (X509Certificate)session1.getPeerCertificates()[0];
session.putValue("tmp", cert.getSubjectDN().toString());
the cert is empty as well.
if i print the session1 it shows SSL_NULL..... , it looks as though no SSL Connection or my cert is invalid could that be it ?
 
in both cases, i've selected my certificate, keyed in my Pin, and the page is displayed but the tmp value is always null.
 
Could my configuration has gone bonkers ? Please assist.
 
thx.

Reply via email to