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

103 lines
3.6 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>将密钥导出到文件中</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.openssl-pkey-export-to-file" class="refentry">
<div class="refnamediv">
<h1 class="refname">openssl_pkey_export_to_file</h1>
<p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">openssl_pkey_export_to_file</span> &mdash; <span class="dc-title">将密钥导出到文件中 </span></p>
</div>
<div class="refsect1 description" id="refsect1-function.openssl-pkey-export-to-file-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>openssl_pkey_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">$key</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$outfilename</code></span>
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$passphrase</code></span>
[, <span class="methodparam"><span class="type">array</span> <code class="parameter">$configargs</code></span>
]] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
<span class="function"><strong>openssl_pkey_export_to_file()</strong></span> 将 ascii 格式
(PEM编码)的 <code class="parameter">key</code> 保存到名为<code class="parameter">outfilename</code>文件中。
</p>
<blockquote class="note"><p><strong class="note">Note</strong>:
<span class="simpara">
必须安装有效的 <var class="filename">openssl.cnf</var> 以保证此函数正确运行。参考有关<a href="openssl.installation.html" class="link">安装</a>的说明以获得更多信息。
</span>
</p></blockquote>
</div>
<div class="refsect1 parameters" id="refsect1-function.openssl-pkey-export-to-file-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">key</code></dt>
<dd>
<p class="para">
</p>
</dd>
<dt>
<code class="parameter">outfilename</code></dt>
<dd>
<p class="para">
输出文件的路径。
</p>
</dd>
<dt>
<code class="parameter">passphrase</code></dt>
<dd>
<p class="para">
密钥可以通过值为<code class="parameter">passphrase</code>的密码来保护。
</p>
</dd>
<dt>
<code class="parameter">configargs</code></dt>
<dd>
<p class="para">
<code class="parameter">configargs</code> 可以用来调整导出流程通过指定或者覆盖openssl配置文件选项。参见 <span class="function"><a href="openssl_csr_new.html" class="function">openssl_csr_new()</a></span> 获取更多关于 <code class="parameter">configargs</code> 的信息。
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-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>