uTools-Manuals/docs/php/openssl_pkcs12_export.html
2019-04-28 19:00:34 +08:00

137 lines
4.1 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" class="refentry">
<div class="refnamediv">
<h1 class="refname">openssl_pkcs12_export</h1>
<p class="verinfo">(PHP 5 &gt;= 5.2.2, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_pkcs12_export</span> &mdash; <span class="dc-title">将 PKCS#12 兼容证书存储文件导出到变量</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.openssl-pkcs12-export-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>openssl_pkcs12_export</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 reference">&$out</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()</strong></span> 以 PKCS#12 文件格式 将 <code class="parameter">x509</code> 导入到以<code class="parameter">out</code>命名类型为字符串的变量中。
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.openssl-pkcs12-export-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">out</code></dt>
<dd>
<p class="para">
成功,该字符串将为 PKCS#12 格式。
</p>
</dd>
<dt>
<code class="parameter">priv_key</code></dt>
<dd>
<p class="para">
PKCS#12 文件的私钥部分file
参见 <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-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>