(PHP 5 >= 5.2.2, PHP 7, PHP 8)
openssl_pkcs12_read — Bir PKCS#12 Sertifika Deposunu bir diziye çözümler
$pkcs12, array &$sertifikalar, #[\SensitiveParameter] string $parola): bool
pkcs12 ile belirtilen PKCS#12 sertifika deposunu
çözümler ve sertifikaları sertifikalar dizisine
yerleştirir.
pkcs12PKCS#12 sertifika deposunun içeriği, dosyası değil.
sertifikalarİşlem başarılı olursa sertifikalar bu diziye konur.
parolaPKCS#12 dosyasının şifresini açmak için parola.
Örnek 1 - openssl_pkcs12_read() örneği
<?php
if (!$cert_store = file_get_contents("/certs/file.p12")) {
echo "Hata: Sertifika dosyası okunamadı\n";
exit;
}
if (openssl_pkcs12_read($cert_store, $cert_info, "parola_burada")) {
echo "Sertifika Bilgisi\n";
print_r($cert_info);
} else {
echo "Hata: Sertifika deposu okunamadı\n";
exit;
}
?>