Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 11081

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Key/Certificate parameters</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="openssl.constsni.html">Server Name Indication constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="openssl.cert.verification.html">Certificate Verification</a></div>
 <div class="up"><a href="book.openssl.html">OpenSSL</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="openssl.certparams" class="appendix">
 <h1>Key/Certificate parameters</h1>

 <p class="para">
  Quite a few of the openssl functions require a key or a certificate
  parameter. Following methods may be used to get them:
  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     Certificates
     <ol type="1">
      <li class="listitem">
       <span class="simpara">
        An X.509 resource returned from
        <span class="function"><a href="function.openssl-x509-read.html" class="function">openssl_x509_read()</a></span>
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">A string having the format
        <var class="filename">file://path/to/cert.pem</var>; the named file must
        contain a PEM encoded certificate
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        A string containing the content of a certificate, PEM encoded, may start with -----BEGIN CERTIFICATE-----
       </span>
      </li>
     </ol>
    </p>
   </li>

   <li class="listitem">
    <p class="para">
     Certificate Signing Requests (CSRs)
     <ol type="1">
      <li class="listitem">
       <span class="simpara">
        A CSR resource returned from
        <span class="function"><a href="function.openssl-csr-new.html" class="function">openssl_csr_new()</a></span>
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">A string having the format
        <var class="filename">file://path/to/csr.pem</var>; the named file must
        contain a PEM encoded CSR
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        A string containing the content of a CSR, PEM encoded, may start with -----BEGIN CERTIFICATE REQUEST-----
       </span>
      </li>
     </ol>
    </p>
   </li>

   
   <li class="listitem">
    <p class="para">
     Public/Private Keys
     <ol type="1">
      <li class="listitem">
       <span class="simpara">A key resource returned from
        <span class="function"><a href="function.openssl-get-publickey.html" class="function">openssl_get_publickey()</a></span> or
        <span class="function"><a href="function.openssl-get-privatekey.html" class="function">openssl_get_privatekey()</a></span>
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">For public keys only: an X.509 resource</span>
      </li>
      <li class="listitem">
       <span class="simpara">A string having the format
        <var class="filename">file://path/to/file.pem</var> - the named file must
        contain a PEM encoded certificate/private key (it may contain both)
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        A string containing the content of a certificate/key, PEM encoded, may start with -----BEGIN PUBLIC KEY-----
       </span>
      </li>
      <li class="listitem">
       <span class="simpara">
        For private keys, you may also use the syntax
        <em>array($key, $passphrase)</em> where <var class="varname"><var class="varname">$key</var></var> represents a
        key specified using the file:// or textual content notation above, and
        <var class="varname"><var class="varname">$passphrase</var></var> represents a string containing the passphrase for that
        private key
       </span>
      </li>
     </ol>
    </p> 
   </li>
  </ul>
 </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="openssl.constsni.html">Server Name Indication constants</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="openssl.cert.verification.html">Certificate Verification</a></div>
 <div class="up"><a href="book.openssl.html">OpenSSL</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>