Sample code for 30+ languages & platforms
Perl

Example: Crypt2.AddPfxSourceBd method

Demonstrates how to call the AddPfxSourceBd method.

Chilkat Perl Downloads

Perl
use chilkat();

$success = 0;

$crypt = chilkat::CkCrypt2->new();
$success = 0;

# Do public-key decryption (RSA)
$crypt->put_CryptAlgorithm("pki");

# ...
# ...
# ...

$bdPfx = chilkat::CkBinData->new();
$success = $bdPfx->LoadFile("c:/my_pfx_files/a.pfx");
# ...

$pfxPassword = "secret1";
$success = $crypt->AddPfxSourceBd($bdPfx,$pfxPassword);
if ($success == 0) {
    print $crypt->lastErrorText() . "\r\n";
    exit;
}

# Add as many as PFX sources as desired...
$success = $bdPfx->LoadFile("c:/my_pfx_files/b.pfx");
$pfxPassword = "secret2";
$success = $crypt->AddPfxSourceBd($bdPfx,$pfxPassword);
if ($success == 0) {
    print $crypt->lastErrorText() . "\r\n";
    exit;
}

# ...
# ...