EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Loading Base-64 encoded Certificate

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 11/06/2012 15:13:42
by Robert Beaubien (Standard support level)
Joined: 10/17/2012
Posts: 18

Do you have a sample of how to load a base-64 encoded certificate file? All your samples seem to require DER encoded.


Posted: 11/06/2012 15:21:15
by Ken Ivanov (EldoS Corp.)


Base64 encoded certificate can be treated either as a PEM certificate or a base64 encoded DER certificate, depending on presence or absence of PEM headers. Please open your certificate with a text editor (e.g. Notepad) and check if its contents is wrapped into '-----BEGIN CERTIFICATE-----' and '-----END CERTIFICATE-----' lines. If the lines are there, use the TElX509Certificate.LoadFromStreamPEM() method. If the only contents of the certificate file are base64 characters, use the LoadFromStream() methods to load it.

You can detect certificate format automatically (and choose an appropriate LoadFromStream* method) by using static TElX509Certificate.DetectCertFileFormat() method.



Topic viewed 647 times

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


Back to top

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

Got it!