Droesjba 0 Posted October 5, 2022 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
Angus Robertson 574 Posted October 5, 2022 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 1 Share this post Link to post
Droesjba 0 Posted October 11, 2022 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
Lajos Juhász 293 Posted October 11, 2022 32 minutes ago, Droesjba said: Any suggestions? Debug your code and find out what is nil. Share this post Link to post
Angus Robertson 574 Posted October 11, 2022 (edited) You probably have not initialised OpenSSL to load the DLLs with OverbyteIcsWSocket.LoadSsl Angus Edited October 11, 2022 by Angus Robertson Share this post Link to post
Droesjba 0 Posted October 12, 2022 (edited) Yes, that's it! Disabling this statement in the PemTool leads to the exception. Thanks! Edited October 12, 2022 by Droesjba Share this post Link to post