Sample code for 30+ languages & platforms
Perl

Example: Crypt2.AddPfxSourceBd method

Demonstrates how to call the AddPfxSourceBd method.

Chilkat Perl Downloads

Chilkat2 Perl
use strict;
use warnings;
use Chilkat2;

my $crypt = Chilkat2::Crypt2->new;
my $success = 0;

# Do public-key decryption (RSA)
$crypt->CryptAlgorithm('pki');

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

my $bdPfx = Chilkat2::BinData->new;
$success = $bdPfx->LoadFile('c:/my_pfx_files/a.pfx');
# ...

my $pfxPassword = 'secret1';
$success = $crypt->AddPfxSourceBd($bdPfx, $pfxPassword);
if (!$success) {
    print $crypt->LastErrorText, "\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) {
    print $crypt->LastErrorText, "\n";
    exit;
}

# ...
# ...