• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Get client certificate in java applet

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy folks,
I'm trying to have my applet pass my personal client certificate (.p12) that I loaded via the Java Control Panel to the server.
I also supplied these Java Applet Runtime Settings via the Java Control Panel:

-Djavax.net.ssl.keyStore=<local path to .p12>

-Djavax.net.ssl.keyStorePassword=<password>

I'm trying to load the client cert in the applet by doing:

KeyStore ks = KeyStore.getInstance("JKS"); ks.load(new FileInputStream(System.getProperty("javax.net.ssl.keyStore"), System.getProperty("javax.net.ssl.keyStorePassword").toCharArray());

I can't access those properties from within the applet. I'm pretty sure that I need to sign my applet to get those properties.
But is it possible to load the client cert without needing the call to:
System.getProperty("javax.net.ssl.keyStorePassword")
If I loaded the client certificate in the Java Control Panel, do I still need to use the Runtime Settings to get the client cert?
Seems like there should be another way to get the client certificate, without having to access the local filesystem.
I'm using JRE 1.6.0_10.
Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic