uTools-Manuals/docs/php/openssl_pkcs12_export_to_file.html
2019-04-08 23:22:26 +08:00

137 lines
3.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>输出一个 PKCS#12 兼容的证书存储文件</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.openssl-pkcs12-export-to-file" class="refentry">
<div class="refnamediv">
<h1 class="refname">openssl_pkcs12_export_to_file</h1>
<p class="verinfo">(PHP 5 &gt;= 5.2.2, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_pkcs12_export_to_file</span> &mdash; <span class="dc-title">输出一个 PKCS#12 兼容的证书存储文件</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.openssl-pkcs12-export-to-file-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>openssl_pkcs12_export_to_file</strong></span>
( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$x509</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
, <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$priv_key</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$pass</code></span>
[, <span class="methodparam"><span class="type">array</span> <code class="parameter">$args</code></span>
] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>openssl_pkcs12_export_to_file()</strong></span> 函数以 PKCS#12 格式将 <code class="parameter">x509</code> 保存至文件名为 <code class="parameter">filename</code> 的文件中。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.openssl-pkcs12-export-to-file-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">x509</code></dt>
<dd>
<p class="para">
参见<a href="openssl.certparams.html" class="link">密钥/证书参数</a>以获取有效值列表。
</p>
</dd>
<dt>
<code class="parameter">filename</code></dt>
<dd>
<p class="para">
输出文件的路径。
</p>
</dd>
<dt>
<code class="parameter">priv_key</code></dt>
<dd>
<p class="para">
PKCS#12文件的私钥部分。
参见 <a href="openssl.certparams.html" class="link">公/私钥参数</a> 获取可用值的列表。
</p>
</dd>
<dt>
<code class="parameter">pass</code></dt>
<dd>
<p class="para">
用于解锁 PKCS#12 文件的加密密码。
</p>
</dd>
<dt>
<code class="parameter">args</code></dt>
<dd>
<p class="para">
可选数组,其他主键将被忽略。
<table class="doctable informaltable">
<thead>
<tr>
<th>Key</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td><em>&quot;extracerts&quot;</em></td>
<td>PKCS#12 文件中包含的额外证书或单个证书的数组。</td>
</tr>
<tr>
<td><em>&quot;friendlyname&quot;</em></td>
<td>被证书和密钥使用的字符串</td>
</tr>
</tbody>
</table>
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.openssl-pkcs12-export-to-file-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
</div></div></div></body></html>