C# Examples

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

C# Examples

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


More Examples...
Amazon S3
NTLM
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

Load PFX (PKCS#12) and List Certificates

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

Download: Chilkat .NET Assemblies

Chilkat.CertStore certStore = new Chilkat.CertStore();

bool success;

string pfxPath;
pfxPath = "/Users/chilkat/testData/pfx/chilkat_ssl.pfx";
string pfxPassword;
pfxPassword = "test";
success = certStore.LoadPfxFile(pfxPath,pfxPassword);
if (success != true) {
    textBox1.Text += certStore.LastErrorText + "\r\n";
    return;
}

int i;
int numCerts;
numCerts = certStore.NumCertificates;

textBox1.Text += "PFX contains " + Convert.ToString(numCerts)
     + " certificates" + "\r\n";

if (numCerts == 0) {
    return;
}

for (i = 0; i <= (numCerts - 1); i++) {

    Chilkat.Cert cert = null;
    cert = certStore.GetCertificate(i);
    if (!(cert == null )) {
        textBox1.Text += Convert.ToString(i) + ": (Common Name) "
             + cert.SubjectCN + "\r\n";
        textBox1.Text += Convert.ToString(i) + ": (Serial Number) "
             + cert.SerialNumber + "\r\n";
        textBox1.Text += Convert.ToString(i) + ": (Distinguished Name) "
             + cert.SubjectDN + "\r\n";

    }

}

 

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

Email Component · XML Parser