please note
the key 'friendlyname' should be 'friendly_name' in args
$args = array(
'friendly_name'=> 'www.example.com'
);
(PHP 5 >= 5.2.2, PHP 7)
openssl_pkcs12_export_to_file — PKCS#12 互換の証明書保存ファイルをエクスポートする
$x509
, string $filename
, mixed $priv_key
, string $pass
[, array $args
] ) : bool
openssl_pkcs12_export_to_file() は、
x509
をファイル
filename
に PKCS#12 フォーマットで保存します。
x509
使用できる値の一覧は キー/証明書パラメータ を参照ください。
filename
出力ファイルへのパス。
priv_key
PKCS#12 ファイルのプライベートキーコンポーネント。
pass
PKCS#12 ファイルのロックを解除するためのパスワード。
args
成功した場合に TRUE
を、失敗した場合に FALSE
を返します。
please note
the key 'friendlyname' should be 'friendly_name' in args
$args = array(
'friendly_name'=> 'www.example.com'
);
[, 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