<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.openssl-x509-read.php',
    1 => 'openssl_x509_read',
    2 => '解析 x.509 证书并返回对象',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL 函数',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-x509-parse.php',
    1 => 'openssl_x509_parse',
  ),
  'next' => 
  array (
    0 => 'function.openssl-x509-verify.php',
    1 => 'openssl_x509_verify',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/openssl/functions/openssl-x509-read.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-x509-read" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_x509_read</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_read</span> &mdash; <span class="dc-title">解析 x.509 证书并返回对象</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-x509-read-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_x509_read</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="type"><span class="type"><a href="class.opensslcertificate.php" class="type OpenSSLCertificate">OpenSSLCertificate</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_read()</strong></span> 解析<code class="parameter">certificate</code> 提供的证书，并返回它的 <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span> 对象。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-x509-read-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">certificate</code></dt>
     <dd>
      <p class="para">
        X509 证书。参见 <a href="openssl.certparams.php" class="link">Key/Certificate parameters</a> 获取可用的值。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-x509-read-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span>， 或者在失败时返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-x509-read-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>
       此函数现在成功时返回 <span class="classname"><a href="class.opensslcertificate.php" class="classname">OpenSSLCertificate</a></span>
       实例；之前返回类型 <code class="literal">OpenSSL X.509</code> 的 <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
      </td>
     </tr>

     <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</code> 的 <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span>。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>

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