?
Solved

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

Posted on 2013-01-02
2
Medium Priority
?
581 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 2000 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 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