<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.openssl-pkcs12-export-to-file.php',
    1 => 'openssl_pkcs12_export_to_file',
    2 => 'Exports a PKCS#12 Compatible Certificate Store File',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Функції OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkcs12-export.php',
    1 => 'openssl_pkcs12_export',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkcs12-read.php',
    1 => 'openssl_pkcs12_read',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/openssl/functions/openssl-pkcs12-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-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, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_pkcs12_export_to_file</span> &mdash; <span class="dc-title">Exports a <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 Compatible Certificate Store File</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>(<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">$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="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_to_file()</strong></span> stores
   <code class="parameter">certificate</code> into a file named by
   <code class="parameter">output_filename</code> in a <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 file format.
  </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.php" class="link">Параметри ключа/сертифіката</a>.
  </p>
 </dd>

    
     <dt><code class="parameter">output_filename</code></dt>
     <dd>
      <p class="para">
       Path to the output file.
      </p>
     </dd>
    
    
     <dt><code class="parameter">private_key</code></dt>
     <dd>
      <p class="para">
      Private key component of <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 file.
      See <a href="openssl.certparams.php" class="link">Public/Private Key parameters</a> for a list of valid values.
      </p>
     </dd>
    
    
     <dt><code class="parameter">passphrase</code></dt>
     <dd>
      <p class="para">
      Encryption password for unlocking the <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 file.
      </p>
     </dd>
    
    
     <dt><code class="parameter">options</code></dt>
     <dd>
      <p class="para">
       Optional array, other keys will be ignored.
       <table class="doctable informaltable">
        
         <thead>
          <tr>
           <th>Key</th>
           <th>Опис</th>
          </tr>

         </thead>

         <tbody class="tbody">
          <tr>
           <td><code class="literal">&quot;extracerts&quot;</code></td>
           <td>array of extra certificates or a single certificate to be included in the <abbr title="Public Key Cryptography Standards">PKCS</abbr>#12 file.</td>
          </tr>

          <tr>
           <td><code class="literal">&quot;friendly_name&quot;</code></td>
           <td>string to be used for the supplied certificate and key</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><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-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">certificate</code> accepts an <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> instance now;
       previously, a <a href="language.types.resource.php" class="link">resource</a> of type <code class="literal">OpenSSL X.509 CSR</code> was accepted.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">private_key</code> accepts an <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span>
       or <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> instance now;
       previously, a <a href="language.types.resource.php" class="link">resource</a> of type <code class="literal">OpenSSL key</code> or <code class="literal">OpenSSL X.509</code>
       was accepted.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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