<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.openssl-csr-export.php',
    1 => 'openssl_csr_export',
    2 => 'Exportiert einen CSR als Zeichenkette',
  ),
  'up' => 
  array (
    0 => 'ref.openssl.php',
    1 => 'OpenSSL-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.openssl-cms-verify.php',
    1 => 'openssl_cms_verify',
  ),
  'next' => 
  array (
    0 => 'function.openssl-csr-export-to-file.php',
    1 => 'openssl_csr_export_to_file',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/openssl/functions/openssl-csr-export.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.openssl-csr-export" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_csr_export</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">openssl_csr_export</span> &mdash; <span class="dc-title">Exportiert einen <abbr title="Certificate Signing Request">CSR</abbr> als Zeichenkette</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.openssl-csr-export-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>openssl_csr_export</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.opensslcertificatesigningrequest.php" class="type OpenSSLCertificateSigningRequest">OpenSSLCertificateSigningRequest</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$csr</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter reference">&$output</code></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$no_text</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_csr_export()</strong></span> exportiert die mit dem Parameter
   <code class="parameter">csr</code> angegebene Zertifikats-Signierungsanfrage und
   speichert diese im <abbr title="Privacy-Enhanced Mail">PEM</abbr>-Format in der Zeichenkette
   <code class="parameter">output</code>, die per Referenz übergeben wird.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.openssl-csr-export-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
 <dt><code class="parameter">csr</code></dt>
 <dd>
  <p class="para">
   Eine Liste der gültigen Werte ist unter <a href="openssl.certparams.php" class="link">CSR-Parameter</a> zu finden.
  </p>
 </dd>

    
     <dt><code class="parameter">output</code></dt>
     <dd>
      <p class="para">
       Im Erfolgsfall enthält diese Zeichenkette den
       <abbr title="Privacy-Enhanced Mail">PEM</abbr>-kodierten <abbr title="Certificate Signing Request">CSR</abbr>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">no_text</code></dt>
     <dd>
      <p class="para">
 Der optionale Parameter<code class="parameter">notext</code> beinflusst die
 Ausführlichkeit der Ausgabe. Wenn er auf <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> gesetzt wird, werden
 zusätzliche lesbare Informationen in die Ausgabe aufgenommen. Der
 Vorgabewert für <code class="parameter">notext</code> ist <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
</p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-csr-export-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.openssl-csr-export-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       Der Parameter <code class="parameter">csr</code> akzeptiert nun eine
       <span class="classname"><a href="class.opensslcertificatesigningrequest.php" class="classname">OpenSSLCertificateSigningRequest</a></span>-Instanz; vorher
       wurde eine <a href="language.types.resource.php" class="link">Ressource</a> vom Typ <code class="literal">OpenSSL X.509 CSR</code>
       akzeptiert.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-csr-export-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>openssl_csr_export()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$subject </span><span style="color: #007700">= array(<br />    </span><span style="color: #DD0000">"commonName" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">"example.com"</span><span style="color: #007700">,<br />);<br /></span><span style="color: #0000BB">$private_key </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_pkey_new</span><span style="color: #007700">(array(<br />    </span><span style="color: #DD0000">"private_key_bits" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">2048</span><span style="color: #007700">,<br />    </span><span style="color: #DD0000">"private_key_type" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">OPENSSL_KEYTYPE_RSA</span><span style="color: #007700">,<br />));<br /></span><span style="color: #0000BB">$configargs </span><span style="color: #007700">= array(<br />    </span><span style="color: #DD0000">'digest_alg' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'sha256WithRSAEncryption'<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$csr </span><span style="color: #007700">= </span><span style="color: #0000BB">openssl_csr_new</span><span style="color: #007700">(</span><span style="color: #0000BB">$subject</span><span style="color: #007700">, </span><span style="color: #0000BB">$private_key</span><span style="color: #007700">, </span><span style="color: #0000BB">$configargs</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">openssl_csr_export</span><span style="color: #007700">(</span><span style="color: #0000BB">$csr</span><span style="color: #007700">, </span><span style="color: #0000BB">$csr_string</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$csr_string</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.openssl-csr-export-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.openssl-csr-export-to-file.php" class="function" rel="rdfs-seeAlso">openssl_csr_export_to_file()</a> - Exportiert einen CSR in eine Datei</span></li>
    <li><span class="function"><a href="function.openssl-csr-new.php" class="function" rel="rdfs-seeAlso">openssl_csr_new()</a> - Erzeugt einen CSR</span></li>
    <li><span class="function"><a href="function.openssl-csr-sign.php" class="function" rel="rdfs-seeAlso">openssl_csr_sign()</a> - Signiert einen CSR mit einem anderen Zertifikat (oder
   sich selbst) und generiert ein Zertifikat</span></li>
   </ul>
  </p>
 </div>


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