Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
583 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

610 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