FoxPro Examples

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

Visual FoxPro Examples

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

More Examples...
Amazon S3
DKIM / DomainKey
NTLM
RSS
Atom
Byte Array
Service
PPMD
Deflate
DH Key Exchange
DSA
FileAccess
Bzip2
LZW

 

Non-Chilkat Links
Text and String Handling

PFX to PEM (Certificate and Private Key Files)

Export a certificate and private key from a PFX to a pair of PEM files.

LOCAL lnSuccess
LOCAL loCertStore
LOCAL lcPassword
LOCAL loCert
LOCAL loPvkey


loCertStore = CreateObject('Chilkat.CertStore')

*  Load the PFX file into a certificate store object

lcPassword = "myPassword"
lnSuccess = loCertStore.LoadPfxFile("chilkat.pfx",lcPassword)
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loCertStore.LastErrorText)
    QUIT
ENDIF

*  Find the cert to be exported by the subject:

loCert = loCertStore.FindCertBySubject("Chilkat Software, Inc.")
IF (loCert = NULL ) THEN
    =MESSAGEBOX("Certificate not found.")
    QUIT
ENDIF

*  Does this cert have a private key?
IF (loCert.HasPrivateKey() = 1) THEN

    *  Get the private key.

    loPvkey = loCert.ExportPrivateKey()

    *   Export the private key to a PEM file:
    lnSuccess = loPvkey.SaveRsaPemFile("chilkat_pkey.pem")
    IF (lnSuccess <> 1) THEN
        =MESSAGEBOX(loPvkey.LastErrorText)
        QUIT
    ENDIF

    RELEASE loPvkey

ENDIF

*  Save the cert to a PEM file:
lnSuccess = loCert.ExportCertPemFile("chilkat_cert.pem")
IF (lnSuccess <> 1) THEN
    =MESSAGEBOX(loCert.LastErrorText)
    QUIT
ENDIF

RELEASE loCert


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

Mail Component · .NET Email Component · ASP Mail Component · XML Parser