EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Unique ID for certificates

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#11187
Posted: 09/29/2009 08:39:35
by Datadec Online (Basic support level)
Joined: 09/09/2009
Posts: 29

I need to store the last certificate used by the user. For X509Certificate2 from Microsoft Framework we are using the GetCertHashString method that gives a 40 char string o 20 bytes.

Which is the equivalent method from TElX509Certificate? Is there any other way to retrieve a unique id from a Certificate?
#11188
Posted: 09/29/2009 08:42:01
by Eugene Mayevski (EldoS Corp.)

In general, the certificate can be uniquely identified using IssuerRDN + Serial. I'd recommend combining IssuerName.CommonName, SerialNumber (convert it to string as it's a binary value!) and Certificate hash (GetHashSHA1, then convert it to string).


Sincerely yours
Eugene Mayevski
#11193
Posted: 09/29/2009 10:16:43
by Datadec Online (Basic support level)
Joined: 09/09/2009
Posts: 29

How can I convert it to string?
#11195
Posted: 09/29/2009 10:25:25
by Datadec Online (Basic support level)
Joined: 09/09/2009
Posts: 29

Ok, I have found it: sbutils.Unit.BinaryToString(sbutils.Unit.DigestToBinary160(cert.GetHashSHA1))

Reply

Statistics

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