<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.openssl-pkey-get-public.php',
    1 => 'openssl_pkey_get_public',
    2 => 'Extrait une cl&eacute; publique d\'un certificat, et la pr&eacute;pare',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Fonctions OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-pkey-get-private.php',
    1 => 'openssl_pkey_get_private',
  ),
  'next' => 
  array (
    0 => 'function.openssl-pkey-new.php',
    1 => 'openssl_pkey_new',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/openssl/functions/openssl-pkey-get-public.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-pkey-get-public" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_pkey_get_public</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_get_public</span> &mdash; <span class="dc-title">Extrait une clé publique d&#039;un certificat, et la prépare</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-pkey-get-public-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_pkey_get_public</strong></span>(<span class="methodparam"><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">$public_key</code></span>): <span class="type"><span class="type"><a href="class.opensslasymmetrickey.php" class="type OpenSSLAsymmetricKey">OpenSSLAsymmetricKey</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_pkey_get_public()</strong></span> extrait la clé publique
   du certificat <code class="parameter">public_key</code> et la prépare
   pour être utilisée par les autres fonctions.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-pkey-get-public-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">public_key</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">public_key</code> peut avoir l&#039;une des valeurs suivantes :
       <ol type="1">
        <li class="listitem">
         <span class="simpara">
          Une instance de <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span>.
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          Une chaîne au format <var class="filename">file://path/to/file.pem</var>.
          Le fichier ainsi désigné doit contenir une clé publique ou
          un certificat au format <abbr title="Privacy-Enhanced Mail">PEM</abbr> (éventuellement les deux).
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          Une clé publique au format <abbr title="Privacy-Enhanced Mail">PEM</abbr>.
         </span>
        </li>
       </ol>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-pkey-get-public-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne une instance de <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> en cas de succès,
   ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-pkey-get-public-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       En cas de succès, cette fonction retourne désormais une instance de
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> ;
       auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> de type <code class="literal">OpenSSL key</code> était retournée.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">public_key</code> accepte désormais une instance de
       <span class="classname"><a href="class.opensslasymmetrickey.php" class="classname">OpenSSLAsymmetricKey</a></span> ou <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> ;
       auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> de type <code class="literal">OpenSSL key</code> ou <code class="literal">OpenSSL X.509</code>
       était acceptée.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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