Jump to content
Droesjba

Search thumbprint in Windows certificate store

Recommended Posts

Given a certain Thumbprint, does ICS offer support for finding the certificate with the given thumbprint from the Windows certificate store? (for Local Machine)

Share this post


Link to post

Yes, this is illustrated in the PemTool sample, on the Certificate Tools tab, select a Windows store and click Display Cert Store. 

 

This fills a TMsX509List using the LoadFromStore method, the sample displays the main information for all certificates found, but you can use the Find method to get the certificate with a specific SHA1 digest.  If you want the SHA256 digest you'll have to loop checking each.

 

Angus

 

  • Thanks 1

Share this post


Link to post

I'm using the LoadFromStore method. My program raises an exception (Access violation at address 00000000).

This occurs in method MsCertToX509 of OverbyteIcsMsSslUtils.pas

To be precise: at line 307 in the statement:  

Result := d2i_X509(nil, @p, x.cbCertEncoded);

 

So the function d2i_X509 of OverbyteIcsLIBEAY.pas seems to be the origin of the exception.

 

The PemTool sample works fine, no problems. My program has administrator rights.

 

Any suggestions?

Share this post


Link to post

You probably have not initialised OpenSSL to load the DLLs with OverbyteIcsWSocket.LoadSsl

 

Angus

 

Edited by Angus Robertson

Share this post


Link to post

Yes, that's it!

Disabling this statement in the PemTool leads to the exception.

Thanks!

Edited by Droesjba

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×