svn: /phpdoc/en/trunk/reference/openssl/functions/ openssl-pkcs12-read.xml
| From: | Philip Olson | Date: | Wed, 09 Sep 2015 23:13:36 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/openssl/functions/ openssl-pkcs12-read.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-13729@lists.php.net to get a copy of this message | ||
philip Wed, 09 Sep 2015 23:13:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=337797
Log:
Added pkcs12 param description and example for PHP Bug #69855
Bug: https://bugs.php.net/69855 (Open)
openssl_pkcs12_read() doesn't read a file
Changed paths:
U phpdoc/en/trunk/reference/openssl/functions/openssl-pkcs12-read.xml
Modified: phpdoc/en/trunk/reference/openssl/functions/openssl-pkcs12-read.xml
===================================================================
--- phpdoc/en/trunk/reference/openssl/functions/openssl-pkcs12-read.xml 2015-09-09 22:55:25 UTC (rev
337796)
+++ phpdoc/en/trunk/reference/openssl/functions/openssl-pkcs12-read.xml 2015-09-09 23:13:36 UTC (rev
337797)
@@ -29,6 +29,7 @@
<term><parameter>pkcs12</parameter></term>
<listitem>
<para>
+ The certificate store contents, not its file name.
</para>
</listitem>
</varlistentry>
@@ -59,6 +60,31 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <example>
+ <title><function>openssl_pkcs12_read</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+if (!$cert_store = file_get_contents("/certs/file.p12")) {
+ echo "Error: Unable to read the cert file\n";
+ exit;
+}
+
+if (openssl_pkcs12_read($cert_store, $cert_info, "my_secret_pass")) {
+ echo "Certificate Information\n";
+ print_r($cert_info);
+} else {
+ echo "Error: Unable to read the cert store.\n";
+ exit;
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file