Link to home
Start Free TrialLog in
Avatar of Victor Roselli
Victor Roselli

asked on

Cannot get Smart Card/CAC digital certificate information into a string (no need to use it at this point, just "see/view" it.)

I'm developing in MS Access (VBA) and trying to capture Smart Card (CAC/PKI) certificate information using VBA.  I simply need Friendly Name or Subject for each certificate, as I can see in ActivClient user console - the program I use to manage certificates.  I know MS Access uses the same certificate to add Digital Signature to a database, and in the certificate selection utility, the fields that have the information I need are Subject and Friendly Name (the same as in ActivClient user console).

I've looked around and keep finding X509 store information, but it's based on .NET and C# code, which I do not know how to use in MS Access.  I cannot make a dll from that code, as I am not running Visual Studio or any other programming applications.  Also, the X509 Store is not in any library reference, so I cannot create an object and use it in VBA.

Does anyone know how to get or read certificate information - using VBA and any readily available references?  BTW, the references I've tried loading were as follows, but I couldn't make any headway with them.

ac.activclient.olaaddin 1.0 Type Library
CertCli
CertEnc
CertEnroll
GrooveCryptoServices

Thanks for any help/guidance!
Avatar of David Favor
David Favor
Flag of United States of America image

One solution is to install the openssl client, as openssl can convert between various cert formats + dump data associated with any cert.

Then to extract your info, run the openssl command line tool, capturing STDOUT produced, to pick up openssl output.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.