Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Load PFX (PKCS#12) and List Certificates

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

Dim certStore As New ChilkatCertStore

Dim success As Long

Dim pfxPath As String
pfxPath = "/Users/chilkat/testData/pfx/chilkat_ssl.pfx"
Dim pfxPassword As String
pfxPassword = "test"
success = certStore.LoadPfxFile(pfxPath,pfxPassword)
If (success <> 1) Then
    Text1.Text = Text1.Text & certStore.LastErrorText & vbCrLf
    Exit Sub
End If

Dim i As Long
Dim numCerts As Long
numCerts = certStore.NumCertificates

Text1.Text = Text1.Text & "PFX contains " & numCerts _
     & " certificates" & vbCrLf

If (numCerts = 0) Then
    Exit Sub
End If

For i = 0 To (numCerts - 1)

    Dim cert As ChilkatCert
    Set cert = certStore.GetCertificate(i)
    If (Not (cert Is Nothing )) Then
        Text1.Text = Text1.Text & i & ": (Common Name) " _
             & cert.SubjectCN & vbCrLf
        Text1.Text = Text1.Text & i & ": (Serial Number) " _
             & cert.SerialNumber & vbCrLf
        Text1.Text = Text1.Text & i & ": (Distinguished Name) " _
             & cert.SubjectDN & vbCrLf

    End If

Next

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