I have implemented a function in Java that generates a self signed certeficate. the output is of type X509Certificate. How can I print my certeficate or how to save it as a readable file ..
Asked
Active
Viewed 649 times
-1
-
would be great to know why this question was downvoted...it was a pretty clear question. – Jeryl Cook Jun 09 '16 at 17:47
1 Answers
0
Look into using BouncyCastle API. Here is the link for PEMWriter class javadocs : https://www.bouncycastle.org/docs/pkixdocs1.5on/org/bouncycastle/openssl/PEMWriter.html
Also, found a stackoverflow question dealing with a similar issue: Write x509 certificate into PEM formatted string in java?