<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.openssl-x509-parse.php',
    1 => 'openssl_x509_parse',
    2 => 'Parse an X509 certificate and return the information as an array',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-x509-free.php',
    1 => 'openssl_x509_free',
  ),
  'next' => 
  array (
    0 => 'function.openssl-x509-read.php',
    1 => 'openssl_x509_read',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/openssl/functions/openssl-x509-parse.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-x509-parse" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_x509_parse</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_x509_parse</span> &mdash; <span class="dc-title">Parse an X509 certificate and return the information as an array</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-x509-parse-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_x509_parse</strong></span>(<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>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$short_names</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</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_x509_parse()</strong></span> returns information about the
   supplied <code class="parameter">certificate</code>, including fields such as subject
   name, issuer name, purposes, valid from and valid to dates etc.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-x509-parse-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">certificate</code></dt>
     <dd>
      <p class="para">
        X509 certificate. See <a href="openssl.certparams.php" class="link">Key/Certificate parameters</a> for a list of valid values.
      </p>
     </dd>
    
    
     <dt><code class="parameter">short_names</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">short_names</code> controls how the data is indexed in the
       array - if <code class="parameter">short_names</code> is <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> (the default) then
       fields will be indexed with the short name form, otherwise, the long name
       form will be used - e.g.: CN is the shortname form of commonName.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-x509-parse-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   <em>The structure of the returned data is (deliberately) not
   yet documented, as it is still subject to change.</em>
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-x509-parse-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versione</th>
      <th>Descrizione</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Parsing certificate with no seconds in UTCTime is no longer allowed for any OpenSSL version.
       It was already disallowed for OpenSSL version 3.3+.
      </td>
     </tr>

     <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</code> was accepted.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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