• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Need to create stashed file of p12 keystore

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

I am able to create p12 keystore using java API but the problem I face is that IHS server expect me to produce stashed file of P12 keystore. I have no idea how to implement and what api can be used to generate the stashed file so that IHS server can directly read and use it for secure communication.
The below code is used to create p12 keystore using java 7.I am creating the certificate using bouncy castle api.

KeyStore keyStore = KeyStore.getInstance("pkcs12");
X509Certificate cert1= (X509Certificate)cert;      
X509Certificate[] chain = new X509Certificate[1];
chain[0]=cert1;
keyStore.setKeyEntry("private", key, "password".toCharArray(), chain);      
keyStore.store(new FileOutputStream(keyPath+"/mykeystore.p12"), "password".toCharArray());

Regards
Sandeep Shukla
reply
    Bookmark Topic Watch Topic
  • New Topic