Is there a possibility to generate an java.security.cert.X509Certificate from an byte[]?
Is there a possibility to generate an java.security.cert.X509Certificate from an byte[]?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure.
The certificate objects can be created by an instance of CertificateFactory – in particular, one configured to create X509 certificates. This can be created like so:
Then you need to pass it an InputStream containing the bytes of the certificate. This can be achieved by wrapping your byte array in a ByteArrayInputStream: