<?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-spki-export-challenge.php',
    1 => 'openssl_spki_export_challenge',
    2 => 'Exporte le challenge associ&eacute; avec la cl&eacute; publique sign&eacute;e',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'Fonctions OpenSSL',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-spki-export.php',
    1 => 'openssl_spki_export',
  ),
  'next' => 
  array (
    0 => 'function.openssl-spki-new.php',
    1 => 'openssl_spki_new',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/openssl/functions/openssl-spki-export-challenge.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-spki-export-challenge" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_spki_export_challenge</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.6.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_spki_export_challenge</span> &mdash; <span class="dc-title">Exporte le challenge associé avec la clé publique signée</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-spki-export-challenge-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_spki_export_challenge</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$spki</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Exporte le challenge associé avec la clé publique signée.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-spki-export-challenge-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
    
     <dt><code class="parameter">spki</code></dt>
     <dd>
      <p class="para">
       Une clé publique signée valide
      </p>
     </dd>
    
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-spki-export-challenge-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne le challenge associé sous la forme d&#039;une chaîne de caractères ou
   <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en cas d&#039;échec.
  </p>
 </div>


  <div class="refsect1 errors" id="refsect1-function.openssl-spki-export-challenge-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
   Émet une alerte de niveau <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> si un argument
   invalide est passé via le paramètre <code class="parameter">spki</code>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-spki-export-challenge-examples">
  <h3 class="title">Exemples</h3>
  <div class="example" id="openssl_spki_export_challenge.example.basic">
   <p><strong>Exemple #1 Exemple avec <span class="function"><strong>openssl_spki_export_challenge()</strong></span></strong></p>
   <div class="example-contents"><p>
    Extrait le challenge associé sous la forme d&#039;une chaîne de caractères
    ou <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> en cas d&#039;échec.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$pkey </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_new</span><span style="color: #007700">(</span><span style="color: #DD0000">'secret password'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$spkac </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_spki_new</span><span style="color: #007700">(</span><span style="color: #0000BB">$pkey</span><span style="color: #007700">, </span><span style="color: #DD0000">'challenge string'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$challenge </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_spki_export_challenge</span><span style="color: #007700">(</span><span style="color: #0000BB">preg_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'/SPKAC=/'</span><span style="color: #007700">, </span><span style="color: #DD0000">''</span><span style="color: #007700">, </span><span style="color: #0000BB">$spkac</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
  <div class="example" id="openssl_spki_export_challenge.example.keygen">
   <p><strong>Exemple #2 Exemple avec <span class="function"><strong>openssl_spki_export_challenge()</strong></span> depuis &lt;keygen&gt;</strong></p>
   <div class="example-contents"><p>
    Extrait le challenge associé issu d&#039;un élément &lt;keygen&gt;
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$challenge </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_spki_export_challenge</span><span style="color: #007700">(</span><span style="color: #0000BB">preg_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'/SPKAC=/'</span><span style="color: #007700">, </span><span style="color: #DD0000">''</span><span style="color: #007700">, </span><span style="color: #0000BB">$_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'spkac'</span><span style="color: #007700">]));<br /></span><span style="color: #0000BB">?&gt;<br /></span>&lt;keygen name="spkac" challenge="challenge string" keytype="RSA"&gt;</span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.openssl-spki-export-challenge-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.openssl-spki-new.php" class="function" rel="rdfs-seeAlso">openssl_spki_new()</a> - G&eacute;n&egrave;re une cl&eacute; publique sign&eacute;e et effectue un challenge</span></li>
    <li><span class="function"><a href="function.openssl-spki-verify.php" class="function" rel="rdfs-seeAlso">openssl_spki_verify()</a> - V&eacute;rifie une cl&eacute; publique sign&eacute;e, et effectue un challenge</span></li>
    <li><span class="function"><a href="function.openssl-spki-export.php" class="function" rel="rdfs-seeAlso">openssl_spki_export()</a> - Exporte un PEM valide format&eacute; comme une cl&eacute; publique sign&eacute;e</span></li>
    <li><span class="function"><a href="function.openssl-get-md-methods.php" class="function" rel="rdfs-seeAlso">openssl_get_md_methods()</a> - R&eacute;cup&egrave;re la liste des m&eacute;thodes digest disponibles</span></li>
    <li><span class="function"><a href="function.openssl-csr-new.php" class="function" rel="rdfs-seeAlso">openssl_csr_new()</a> - G&eacute;n&egrave;re une CSR</span></li>
    <li><span class="function"><a href="function.openssl-csr-sign.php" class="function" rel="rdfs-seeAlso">openssl_csr_sign()</a> - Signe un CSR avec un autre certificat (ou lui-m&ecirc;me) et g&eacute;n&egrave;re un certificat</span></li>
   </ul>
  </p>
 </div>


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