DataFlex
DataFlex
Load a Certificate from the Windows Certificate Store
See more Certificates Examples
Demonstrates how to load a certificate that has been pre-installed in the registry-based Windows certificate store. This is generally how one would load a certificate that is stored on a smart card or usb token.Chilkat DataFlex Downloads
Use ChilkatAx-win32.pkg
Procedure Test
Boolean iSuccess
Handle hoCert
String sTemp1
Move False To iSuccess
Get Create (RefClass(cComChilkatCert)) To hoCert
If (Not(IsComObjectCreated(hoCert))) Begin
Send CreateComObject of hoCert
End
Get ComLoadByCommonName Of hoCert "PIVKey 7ED53EC611D3F84396212C5842BB563F" To iSuccess
If (iSuccess <> True) Begin
Get ComLastErrorText Of hoCert To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComSubjectDN Of hoCert To sTemp1
Showln "Loaded: " sTemp1
End_Procedure