PHP
Chilkat2 PHP
Example: Crypt2.SetSigningCert method
Demonstrates how to call the SetSigningCert method.Chilkat PHP Downloads
<?php
use Chilkat2\Cert;
use Chilkat2\Crypt2;
// Signing certificates can be obtained from many different sources..
// Load from a PFX
$cryptA = new Crypt2();
$certA = new Cert();
$certA->LoadPfxFile('c:/someDir/pfx_files/a.pfx', 'pfx_file_password');
$cryptA->SetSigningCert($certA);
// ...
// Load from a smart card or USB token.
$cryptB = new Crypt2();
$certB = new Cert();
$certB->SmartCardPin = '123456';
$certB->LoadFromSmartcard('');
$cryptB->SetSigningCert($certB);
// ...
// Load from a the Windows certificate store or macOS keychain
$cryptC = new Crypt2();
$certC = new Cert();
$certC->LoadByCommonName('Xyz 123');
$cryptC->SetSigningCert($certC);
// ...