Chilkat ActiveX Downloads

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)
set cert = CreateObject("Chilkat_9_5_0.Cert")
' Load a DER (binary) encoded certificate.' To load from a .pem or .p7b, or any other file format that contains' just one certificate, call LoadFromFile in exactly the same way.' The LoadFromFile method automatically detects the format and loads the certificate.
success = cert.LoadFromFile("qa_data/certs/testCert.cer")
If (success = 0) Then
outFile.WriteLine(cert.LastErrorText)
WScript.Quit
End If' Get the public key:' pubKey is a Chilkat_9_5_0.PublicKey
Set pubKey = cert.ExportPublicKey()
If (cert.LastMethodSuccess <> 1) Then
outFile.WriteLine(cert.LastErrorText)
WScript.Quit
End If' Examine the key type.' A PublicKey object can contain an RSA, ECC, or DSA public key.' The KeyType property will contain "rsa", "ecc", or "dsa".
outFile.WriteLine("key type = " & pubKey.KeyType)
outFile.Close