(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() 函数以 PKCS#12 格式将 x509 保存至文件名为 filename 的文件中。
  
   成功时返回 TRUE, 或者在失败时返回 FALSE。