1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

Add support for pkcs11 (#769)

This commit is contained in:
Michele Locati 2023-06-26 18:00:24 +02:00 committed by GitHub
parent f5b3ab78a3
commit 57228536a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 0 deletions

13
scripts/tests/pkcs11 Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env php
<?php
require_once __DIR__ . '/_bootstrap.php';
$module = new Pkcs11\Module('/usr/lib/softhsm/libsofthsm2.so');
$moduleInfo = $module->getInfo();
if (!is_array($moduleInfo)) {
fwrite(STDERR, "Pkcs11\\Module::getInfo() should return an array\n");
}
if (!isset($moduleInfo['manufacturerID']) || $moduleInfo['manufacturerID'] !== 'SoftHSM') {
fwrite(STDERR, "Unexpected return value of Pkcs11\\Module::getInfo()\n");
}