EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Loading Base-64 encoded Certificate

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#22364
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.

Thanx,


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

Robert,

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.

Reply

Statistics

Topic viewed 598 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!