<?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-pkcs12-export.php',
    1 => 'openssl_pkcs12_export',
    2 => 'PKCS#12 互換の証明書保存ファイルを変数にエクスポートする',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL 関数',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pbkdf2.php',
    1 => 'openssl_pbkdf2',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkcs12-export-to-file.php',
    1 => 'openssl_pkcs12_export_to_file',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/openssl/functions/openssl-pkcs12-export.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_pkcs12_export</span> &mdash; <span class="dc-title"><abbr title="Public Key Cryptography Standards">PKCS</abbr>#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>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><span class="type"><a href="class.opensslcertificate.php" class="type OpenSSLCertificate">OpenSSLCertificate</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$certificate</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 reference">&$output</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="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">$private_key</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="attribute"><a href="class.sensitiveparameter.php">#[\SensitiveParameter]</a> </span><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$passphrase</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code><span class="initializer"> = []</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_pkcs12_export()</strong></span> は、
   <code class="parameter">certificate</code> を <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 ファイルフォーマットにしたものを
   <code class="parameter">output</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">certificate</code></dt>
 <dd>
  <p class="para">
   使用できる値の一覧は <a href="openssl.certparams.php" class="link">キー/証明書パラメータ</a> を参照ください。
  </p>
 </dd>

    
     <dt><code class="parameter">output</code></dt>
     <dd>
      <p class="para">
       成功した場合に、ここに <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 が保存されます。
      </p>
     </dd>
    
    
     <dt><code class="parameter">private_key</code></dt>
     <dd>
      <p class="para">
      <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 ファイルのプライベートキーコンポーネント。
      正しい値の一覧については、<a href="openssl.certparams.php" class="link">Public/Private Key parameters</a> を参照ください。
      </p>
     </dd>
    
    
     <dt><code class="parameter">passphrase</code></dt>
     <dd>
      <p class="para">
      <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 ファイルのロックを解除するためのパスワード。
      </p>
     </dd>
    
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       オプションの配列。以下に示すキー以外は無視されます。
       <table class="doctable informaltable">
        
         <thead>
          <tr>
           <th>キー</th>
           <th>説明</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td><code class="literal">&quot;extracerts&quot;</code></td>
           <td><abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 ファイルに含まれる単一の証明書、または 外部の証明書の配列</td>
          </tr>

          <tr>
           <td><code class="literal">&quot;friendly_name&quot;</code></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><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-pkcs12-export-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">certificate</code> は、
       <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> クラスのインスタンスを受け入れるようになりました。
       これより前のバージョンでは、
       <code class="literal">OpenSSL X.509 CSR</code> 型のリソースを受け入れていました。
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">private_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); ?>