<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.openssl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.openssl-pkey-export-to-file.php',
    1 => 'openssl_pkey_export_to_file',
    2 => 'エクスポート可能な形式で、キーをファイルに取得する',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL 関数',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkey-export.php',
    1 => 'openssl_pkey_export',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkey-free.php',
    1 => 'openssl_pkey_free',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/openssl/functions/openssl-pkey-export-to-file.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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, PHP 8)</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>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span>|<span class="type"><a href="class.opensslcertificate.php" class="type OpenSSLCertificate">OpenSSLCertificate</a></span>|<span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$output_filename</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$passphrase</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.array.php" class="type array">array</a></span></span> <code class="parameter">$options</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_export_to_file()</strong></span> は、ASCII 変換された
   (<abbr title="Privacy-Enhanced Mail">PEM</abbr> エンコードされた) <code class="parameter">key</code> を
   <code class="parameter">output_filename</code> のファイルに保存します。
  </p>
  <blockquote class="note"><p><strong class="note">注意</strong>: 
 <span class="simpara">
  この関数を正しく動作させるには、正しい形式の
  <var class="filename">openssl.cnf</var> をインストールしておく必要があります。
  詳細な情報は、<a href="openssl.installation.php" 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">output_filename</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">options</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">options</code> により openssl 設定ファイルの設定を
       追加したり上書きしたりすることで、エクスポート処理の詳細設定が可能です。
       <code class="parameter">options</code> についての詳細な情報は
       <span class="function"><a href="function.openssl-csr-new.php" class="function">openssl_csr_new()</a></span> を参照ください。
      </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><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-pkey-export-to-file-changelog">
  <h3 class="title">変更履歴</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>バージョン</th>
      <th>説明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">key</code> は、
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> または
       <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> クラスのインスタンスを受け入れるようになりました。
       これより前のバージョンでは、
       <code class="literal">OpenSSL key</code> または
       <code class="literal">OpenSSL X.509</code> 型のリソースを受け入れていました。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

</div><?php manual_footer($setup); ?>