File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes featchin security info. in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "featchin security info. in jsp" Watch "featchin security info. in jsp" New topic

featchin security info. in jsp

sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
i have to make a page which will featch the login information from the clients browser and after checking some credential it has to make him login to the server.

the cert. is X509 type and i am using MyKeyStore.pfx (pkcs#12) to store this certificate. i am usinf following code --------->


String cipherSuite =
(String) request.getAttribute("");

out.println("Cipher Suite: " + cipherSuite);

// Display the client's certificates, if there are any

if (cipherSuite != null)
X509Certificate certChain[] =
(X509Certificate[]) request.getAttribute("");
if (certChain != null) {
for (int i = 0; i < certChain.length; i++) {
System.out.println("Client Certificate [" + i + "] = "+ certChain[i].toString());


here cyberSuite will identify the encription algorithum used by SSl connection. i am trying it on oracle 10G server(SSL and non-SSL both) but it's not working.

i got a suggesion to first install my X509 cert. in user browser's prsonal certificate area, but the pk12 or pfx file which i have made to install in this area is not even installing, it says courrupted pk12/pfx file or password is wrong. i am using the same password for keystore(MyKeyStore.pfx) and X509 cert. file and java KEYTOOL to generate certificate file and keystore(MyKeyStore.pk12/pfx).i have tried this on firefox and IE
sachin yadav
Ranch Hand

Joined: Nov 24, 2005
Posts: 156
i am able to install the dummy certificate in browser. now i want my program to fetch this certificate from user browser header. can anybody give me some help or idea.

the above code is not working,
I agree. Here's the link:
subject: featchin security info. in jsp
It's not a secret anymore!