Solved

How do I generate a self-signed certificate and import it into the truststore using apis?

Posted on 2013-01-02
2
571 Views
Last Modified: 2013-01-04
Hi,
How do I generate a self-signed certificate and import it programatically using apis?

Would CertificateFactory.getInstance("X.509").generateCertificate() generate the certificate?

How do I import the generated certificate into the trust store via api?
I cannot use the commandline tool keytool.
But the commandline equivalent would be
keytool -import -v -trustcacerts -alias serveralias -file server.cer -keystore cacerts.jks -keypass changeit -storepass changeit

Thanks
Jamie
0
Comment
Question by:jamie_lynn
2 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 38739308
0
 

Author Closing Comment

by:jamie_lynn
ID: 38745786
Yeah.. i don't think I get generate and load to trust store programatically.
Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
ArrayLists in ArrayLists/HashMaps? 4 40
where is session ID cache stored 1 40
firstChar challenge 13 85
bitbucket vs gitbucket 3 32
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now