Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

featchin security info. in jsp

Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic