VB.NET Examples

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

VB.NET Examples

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

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

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

Load PFX (PKCS#12) and List Certificates

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

Download: Chilkat .NET Assemblies

Dim certStore As New Chilkat.CertStore()

Dim success As Boolean

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 <> true) Then
    TextBox1.Text = TextBox1.Text & certStore.LastErrorText & vbCrLf
    Exit Sub
End If


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

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

If (numCerts = 0) Then
    Exit Sub
End If


For i = 0 To (numCerts - 1)

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

    End If


Next
 

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

Mail Component · XML Parser