openssl_pkcs12_export_to_file
(PHP 5 >= 5.2.2, PHP 7, PHP 8)
openssl_pkcs12_export_to_file — 输出一个 PKCS#12 兼容的证书存储文件
说明
openssl_pkcs12_export_to_file(
mixed
string
mixed
string
array
): bool
mixed
$x509
,string
$filename
,mixed
$priv_key
,string
$pass
,array
$args
= ?): bool
openssl_pkcs12_export_to_file() 函数以 PKCS#12 格式将 x509
保存至文件名为 filename
的文件中。
参数
返回值
成功时返回 true
, 或者在失败时返回 false
。

User Contributed Notes 2 notes
greejd ¶
3 years ago
please note
the key 'friendlyname' should be 'friendly_name' in args
$args = array(
'friendly_name'=> 'www.example.com'
);
lampacz at gmail dot com ¶
12 years ago
[, array $args ] can contain only: extracerts, friendly_name
extracerts - additional certificates (can be file or string)
friendly_name - "friendly name" for the certificate and private key. This name is typically displayed in list boxes by software importing the file.
based on source code version 5.2.8 and pkcs12 man page
备份地址:http://www.lvesu.com/blog/php/function.openssl-pkcs12-export-to-file.php