EldoS | Feel safer!

Software components for data protection, secure storage and transfer

[Java] How to get an X509Cerficate form a TElX509Certificate ?

Posted: 07/01/2013 04:10:07
by Mickaël Bénès (Standard support level)
Joined: 02/26/2013
Posts: 80

Hi there !

I found how to create a TElX509Certificate object from an X509Certificate object using :

But how can I do the opposite, create an X509Certificate from a TElX509Certificate ?
I've got several methods in my application that verify an X509Certificate and for now I don't want to change all of my application's X509Certificate objects into TElX509Certificate objects, that'll come later.

Thanks !

Posted: 07/01/2013 04:17:25
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

The code will look this way:

ByteArrayOutputStream os = new ByteArrayOutputStream();
TElX509Certificate x509 = new TElX509Certificate();

CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
InputStream in = new ByteArrayInputStream(os.toByteArray());
X509Certificate cert = (X509Certificate)certFactory.generateCertificate(in);

The latest 11th version of SecureBlackbox includes TElX509Certificate.ToX509Certificate/FromX509Certificate methods to simplify the conversion.
Posted: 07/01/2013 04:35:54
by Mickaël Bénès (Standard support level)
Joined: 02/26/2013
Posts: 80

Thank you for the quick answer !

The 11th version of SecureBlackBox is only available has a beta for what I've seen, so I'll wait for the official release. Good to know though, thanks !



Topic viewed 491 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!