Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Importing digital certificate programmatically through jsp screen

Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In our project client asked me to upload certificate (*.pfx) into a servlet and then import that stream to
java keystore file.

From JSP to servlet i am getting certificate information and i am getting ByteArrayInputstream, but when i try
to import this to keystore by using
KeyStore source = KeyStore.getInstance("PKCS12");
source.load(ByteArrayInputstream, pkcs12Password.toCharArray());

But i am always getting DerInputStream.getLength(): lengthTag=127, too big.
at Source)
at Source)
at<init>(Unknown Source)
at Source)
at Source)

Any suggestion or help for this one.
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
The trailboss has a kickstarter
    Bookmark Topic Watch Topic
  • New Topic