B4X
B4X
Example: Crypt2.SetSigningCert method
Demonstrates how to call the SetSigningCert method.Chilkat B4X Downloads
Dim success As Boolean = False
' Signing certificates can be obtained from many different sources..
' Load from a PFX
Dim cryptA As ChilkatCrypt2
cryptA.Initialize("cryptA")
Dim certA As ChilkatCert
certA.Initialize("certA")
success = certA.LoadPfxFile("c:/someDir/pfx_files/a.pfx", "pfx_file_password")
success = cryptA.SetSigningCert(certA)
' ...
' Load from a smart card or USB token.
Dim cryptB As ChilkatCrypt2
cryptB.Initialize("cryptB")
Dim certB As ChilkatCert
certB.Initialize("certB")
certB.SmartCardPin = "123456"
success = certB.LoadFromSmartcard("")
success = cryptB.SetSigningCert(certB)
' ...
' Load from a the Windows certificate store or macOS keychain
Dim cryptC As ChilkatCrypt2
cryptC.Initialize("cryptC")
Dim certC As ChilkatCert
certC.Initialize("certC")
success = certC.LoadByCommonName("Xyz 123")
success = cryptC.SetSigningCert(certC)
' ...