Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

DataFlex Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(DataFlex) Load PFX (PKCS#12) and List Certificates

Loads a PFX file (.pfx, .p12) and iterates over the certificates found within.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoCertStore
    Boolean iSuccess
    String sPfxPath
    String sPfxPassword
    Integer iNumCerts
    Integer i
    Variant vCert
    Handle hoCert
    String sTemp1

    Get Create (RefClass(cComChilkatCertStore)) To hoCertStore
    If (Not(IsComObjectCreated(hoCertStore))) Begin
        Send CreateComObject of hoCertStore
    End

    Move "/Users/chilkat/testData/pfx/chilkat_ssl.pfx" To sPfxPath
    Move "test" To sPfxPassword
    Get ComLoadPfxFile Of hoCertStore sPfxPath sPfxPassword To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastErrorText Of hoCertStore To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComNumCertificates Of hoCertStore To iNumCerts

    Showln "PFX contains " iNumCerts " certificates"

    Move 0 To i
    While (i < iNumCerts)
        Get ComGetCertificate Of hoCertStore i To vCert
        If (IsComObject(vCert)) Begin
            Get Create (RefClass(cComChilkatCert)) To hoCert
            Set pvComObject Of hoCert To vCert
        End

        Get ComSubjectCN Of hoCert To sTemp1
        Showln i ": (Common Name) " sTemp1
        Get ComSerialNumber Of hoCert To sTemp1
        Showln i ": (Serial Number) " sTemp1
        Get ComSubjectDN Of hoCert To sTemp1
        Showln i ": (Distinguished Name) " sTemp1
        Send Destroy of hoCert

        Move i + 1 To i
    Loop



End_Procedure

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.