cvs: phpdoc /en/reference/openssl/functions openssl-csr-export-to-file.xml openssl-csr-export.xml openssl-csr-new.xml openssl-csr-sign.xml
openssl-error-string.xml openssl-free-key.xml openssl-get-privatekey.xml openssl-get-publickey.xml openssl-open.xml openssl-pkcs7-decrypt.xml
openssl-pkcs7-encrypt.xml openssl-pkcs7-sign.xml openssl-pkcs7-verify.xml openssl-pkey-export-to-file.xml openssl-pkey-export.xml
openssl-pkey-free.xml openssl-pkey-get-private.xml openssl-pkey-get-public.xml openssl-pkey-new.xml openssl-private-decrypt.xml
openssl-private-encrypt.xml openssl-public-decrypt.xml openssl-public-encrypt.xml openssl-seal.xml openssl-sign.xml openssl-verify.xml
openssl-x509-check-private-key.xml openssl-x509-checkpurpose.xml openssl-x509-export-to-file.xml openssl-x509-export.xml openssl-x509-free.xml
openssl-x509-parse.xml openssl-x509-read.xml
| From: | Mehdi Achour | Date: | Mon, 11 Jun 2007 23:31:38 +0000 |
| Subject: | cvs: phpdoc /en/reference/openssl/functions openssl-csr-export-to-file.xml openssl-csr-export.xml openssl-csr-new.xml openssl-csr-sign.xml openssl-error-string.xml openssl-free-key.xml openssl-get-privatekey.xml openssl-get-publickey.xml openssl-open.xml openssl-pkcs7-decrypt.xml openssl-pkcs7-encrypt.xml openssl-pkcs7-sign.xml openssl-pkcs7-verify.xml openssl-pkey-export-to-file.xml openssl-pkey-export.xml openssl-pkey-free.xml openssl-pkey-get-private.xml openssl-pkey-get-public.xml openssl-pkey-new.xml openssl-private-decrypt.xml openssl-private-encrypt.xml openssl-public-decrypt.xml openssl-public-encrypt.xml openssl-seal.xml openssl-sign.xml openssl-verify.xml openssl-x509-check-private-key.xml openssl-x509-checkpurpose.xml openssl-x509-export-to-file.xml openssl-x509-export.xml openssl-x509-free.xml openssl-x509-parse.xml openssl-x509-read.xml |
||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969376649@lists.php.net to get a copy of this message | ||
didou Mon Jun 11 23:31:38 2007 UTC
Modified files:
/phpdoc/en/reference/openssl/functions
openssl-csr-export-to-file.xml
openssl-csr-export.xml
openssl-csr-new.xml
openssl-csr-sign.xml
openssl-error-string.xml
openssl-free-key.xml
openssl-get-privatekey.xml
openssl-get-publickey.xml
openssl-open.xml
openssl-pkcs7-decrypt.xml
openssl-pkcs7-encrypt.xml
openssl-pkcs7-sign.xml
openssl-pkcs7-verify.xml
openssl-pkey-export-to-file.xml
openssl-pkey-export.xml
openssl-pkey-free.xml
openssl-pkey-get-private.xml
openssl-pkey-get-public.xml
openssl-pkey-new.xml
openssl-private-decrypt.xml
openssl-private-encrypt.xml
openssl-public-decrypt.xml
openssl-public-encrypt.xml
openssl-seal.xml
openssl-sign.xml
openssl-verify.xml
openssl-x509-check-private-key.xml
openssl-x509-checkpurpose.xml
openssl-x509-export-to-file.xml
openssl-x509-export.xml
openssl-x509-free.xml
openssl-x509-parse.xml
openssl-x509-read.xml
Log:
ref.openssl: switch to new doc style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-csr-export-to-file"> <refnamediv> <refname>openssl_csr_export_to_file</refname> <refpurpose>Exports a CSR to a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_csr_export_to_file</methodname> <methodparam><type>resource</type><parameter>csr</parameter></methodparam> @@ -19,16 +19,55 @@ Signing Request represented by <parameter>csr</parameter> and saves it as ascii-armoured text into the file named by <parameter>outfilename</parameter>. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> - <simpara> - See also <function>openssl_csr_export</function>, - <function>openssl_csr_new</function> and - <function>openssl_csr_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_csr_export</function></member> + <member><function>openssl_csr_new</function></member> + <member><function>openssl_csr_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-export.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-csr-export"> <refnamediv> <refname>openssl_csr_export</refname> <refpurpose>Exports a CSR as a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_csr_export</methodname> <methodparam><type>resource</type><parameter>csr</parameter></methodparam> @@ -20,16 +20,54 @@ ascii-armoured text into <parameter>out</parameter>, which is passed by reference. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>out</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> - <simpara> - See also <function>openssl_csr_export_to_file</function>, - <function>openssl_csr_new</function> and - <function>openssl_csr_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_csr_export_to_file</function></member> + <member><function>openssl_csr_new</function></member> + <member><function>openssl_csr_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-new.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-new.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.16 phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.17 --- phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.16 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-new.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.17 $ --> <refentry id="function.openssl-csr-new"> <refnamediv> <refname>openssl_csr_new</refname> <refpurpose>Generates a CSR</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>openssl_csr_new</methodname> <methodparam><type>array</type><parameter>dn</parameter></methodparam> @@ -20,98 +20,135 @@ based on the information provided by <parameter>dn</parameter>, which represents the Distinguished Name to be used in the certificate. </para> + &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>privkey</parameter> should be set to a private key that was - previously generated by <function>openssl_pkey_new</function> (or - otherwise obtained from the other openssl_pkey family of functions). - The corresponding public portion of the key will be used to sign the - CSR. - </para> - <para> - <parameter>extraattribs</parameter> is used to specify additional - configuration options for the CSR. Both <parameter>dn</parameter> and - <parameter>extraattribs</parameter> are associative arrays whose keys are - converted to OIDs and applied to the relevant part of the request. + <variablelist> + <varlistentry> + <term><parameter>dn</parameter></term> + <listitem> + <para> + The Distinguished Name to be used in the certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>privkey</parameter></term> + <listitem> + <para> + <parameter>privkey</parameter> should be set to a private key that was + previously generated by <function>openssl_pkey_new</function> (or + otherwise obtained from the other openssl_pkey family of functions). + The corresponding public portion of the key will be used to sign the + CSR. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + By default, the information in your system <literal>openssl.conf</literal> + is used to initialize the request; you can specify a configuration file + section by setting the <literal>config_section_section</literal> key of + <parameter>configargs</parameter>. You can also specify an alternative + openssl configuration file by setting the value of the + <literal>config</literal> key to the path of the file you want to use. + The following keys, if present in <parameter>configargs</parameter> + behave as their equivalents in the <literal>openssl.conf</literal>, as + listed in the table below. + <table> + <title>Configuration overrides</title> + <tgroup cols="3"> + <thead> + <row> + <entry><parameter>configargs</parameter> key</entry> + <entry>type</entry> + <entry><literal>openssl.conf</literal> equivalent</entry> + <entry>description</entry> + </row> + </thead> + <tbody> + <row> + <entry>digest_alg</entry> + <entry><type>string</type></entry> + <entry>default_md</entry> + <entry>Selects which digest method to use</entry> + </row> + <row> + <entry>x509_extensions</entry> + <entry><type>string</type></entry> + <entry>x509_extensions</entry> + <entry>Selects which extensions should be used when creating an x509 + certificate</entry> + </row> + <row> + <entry>req_extensions</entry> + <entry><type>string</type></entry> + <entry>req_extensions</entry> + <entry>Selects which extensions should be used when creating a CSR</entry> + </row> + <row> + <entry>private_key_bits</entry> + <entry><type>integer</type></entry> + <entry>default_bits</entry> + <entry>Specifies how many bits should be used to generate a private + key</entry> + </row> + <row> + <entry>private_key_type</entry> + <entry><type>integer</type></entry> + <entry>none</entry> + <entry>Specifies the type of private key to create. This can be one + of <constant>OPENSSL_KEYTYPE_DSA</constant>, + <constant>OPENSSL_KEYTYPE_DH</constant> or + <constant>OPENSSL_KEYTYPE_RSA</constant>. + The default value is <constant>OPENSSL_KEYTYPE_RSA</constant> which + is currently the only supported key type. + </entry> + </row> + <row> + <entry>encrypt_key</entry> + <entry><type>boolean</type></entry> + <entry>encrypt_key</entry> + <entry>Should an exported key (with passphrase) be encrypted?</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extraattribs</parameter></term> + <listitem> + <para> + <parameter>extraattribs</parameter> is used to specify additional + configuration options for the CSR. Both <parameter>dn</parameter> and + <parameter>extraattribs</parameter> are associative arrays whose keys are + converted to OIDs and applied to the relevant part of the request. + </para> + </listitem> + </varlistentry> + </variablelist> </para> - &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - By default, the information in your system <literal>openssl.conf</literal> - is used to initialize the request; you can specify a configuration file - section by setting the <literal>config_section_section</literal> key of - <parameter>configargs</parameter>. You can also specify an alternative - openssl configuration file by setting the value of the - <literal>config</literal> key to the path of the file you want to use. - The following keys, if present in <parameter>configargs</parameter> - behave as their equivalents in the <literal>openssl.conf</literal>, as - listed in the table below. - - <table> - <title>Configuration overrides</title> - <tgroup cols="3"> - <thead> - <row> - <entry><parameter>configargs</parameter> key</entry> - <entry>type</entry> - <entry><literal>openssl.conf</literal> equivalent</entry> - <entry>description</entry> - </row> - </thead> - <tbody> - <row> - <entry>digest_alg</entry> - <entry><type>string</type></entry> - <entry>default_md</entry> - <entry>Selects which digest method to use</entry> - </row> - <row> - <entry>x509_extensions</entry> - <entry><type>string</type></entry> - <entry>x509_extensions</entry> - <entry>Selects which extensions should be used when creating an x509 - certificate</entry> - </row> - <row> - <entry>req_extensions</entry> - <entry><type>string</type></entry> - <entry>req_extensions</entry> - <entry>Selects which extensions should be used when creating a CSR</entry> - </row> - <row> - <entry>private_key_bits</entry> - <entry><type>integer</type></entry> - <entry>default_bits</entry> - <entry>Specifies how many bits should be used to generate a private - key</entry> - </row> - <row> - <entry>private_key_type</entry> - <entry><type>integer</type></entry> - <entry>none</entry> - <entry>Specifies the type of private key to create. This can be one - of <constant>OPENSSL_KEYTYPE_DSA</constant>, - <constant>OPENSSL_KEYTYPE_DH</constant> or - <constant>OPENSSL_KEYTYPE_RSA</constant>. - The default value is <constant>OPENSSL_KEYTYPE_RSA</constant> which - is currently the only supported key type. - </entry> - </row> - <row> - <entry>encrypt_key</entry> - <entry><type>boolean</type></entry> - <entry>encrypt_key</entry> - <entry>Should an exported key (with passphrase) be encrypted?</entry> - </row> - </tbody> - </tgroup> - </table> + Returns the CSR. </para> - <simpara> - &return.success; - </simpara> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title><function>openssl_csr_new</function> example - creating a - self-signed-certificate</title> + <title>Creating a self-signed-certificate</title> <programlisting role="php"> <![CDATA[ <?php @@ -165,6 +202,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.11 phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.12 --- phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.11 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.openssl-csr-sign"> <refnamediv> <refname>openssl_csr_sign</refname> <refpurpose>Sign a CSR with another certificate (or itself) and generate a certificate</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_csr_sign</methodname> <methodparam><type>mixed</type><parameter>csr</parameter></methodparam> @@ -19,28 +19,110 @@ </methodsynopsis> <para> <function>openssl_csr_sign</function> generates an x509 certificate - resource from the <parameter>csr</parameter> previously generated by - <function>openssl_csr_new</function>, but it can also be the path to - a PEM encoded CSR when specified as - <filename>file://path/to/csr</filename> or an exported string generated - by <function>openssl_csr_export</function>. - The generated certificate will be signed by - <parameter>cacert</parameter>. If <parameter>cacert</parameter> is &null;, - the generated certificate will be a self-signed certificate. - <parameter>priv_key</parameter> is the private key that corresponds to - <parameter>cacert</parameter>. - <parameter>days</parameter> specifies the length of time for which the - generated certificate will be valid, in days. - You can finetune the CSR signing by <parameter>configargs</parameter>. - See <function>openssl_csr_new</function> for more information about - <parameter>configargs</parameter>. - Since PHP 4.3.3 you can specify the serial number of issued certificate by - <parameter>serial</parameter>. In earlier versions, it was always 0. + resource from the given CSR. </para> + &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + A CSR previously generated by <function>openssl_csr_new</function>. + It can also be the path to a PEM encoded CSR when specified as + <filename>file://path/to/csr</filename> or an exported string generated + by <function>openssl_csr_export</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cacert</parameter></term> + <listitem> + <para> + The generated certificate will be signed by <parameter>cacert</parameter>. + If <parameter>cacert</parameter> is &null;, the generated certificate + will be a self-signed certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key</parameter></term> + <listitem> + <para> + <parameter>priv_key</parameter> is the private key that corresponds to + <parameter>cacert</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>days</parameter></term> + <listitem> + <para> + <parameter>days</parameter> specifies the length of time for which the + generated certificate will be valid, in days. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + You can finetune the CSR signing by <parameter>configargs</parameter>. + See <function>openssl_csr_new</function> for more information about + <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>serial</parameter></term> + <listitem> + <para> + An optional the serial number of issued certificate. If not specified + it will default to 0. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> Returns an x509 certificate resource on success, &false; on failure. </para> - &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.3</entry> + <entry> + The <parameter>serial</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_csr_sign</function> example - signing a @@ -79,6 +161,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-error-string.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-error-string.xml diff -u phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-error-string.xml Mon Jun 11 23:31:38 2007 @@ -1,26 +1,34 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-error-string"> <refnamediv> <refname>openssl_error_string</refname> <refpurpose>Return openSSL error message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>openssl_error_string</methodname> <void/> </methodsynopsis> <para> - Returns an error message string, or &false; if there are no more error - messages to return. - </para> - <para> <function>openssl_error_string</function> returns the last error from the openSSL library. Error messages are stacked, so this function should be called multiple times to collect all of the information. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an error message string, or &false; if there are no more error + messages to return. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_error_string</function> example</title> @@ -36,6 +44,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-free-key.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-free-key.xml diff -u phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.4 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-free-key.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-free-key"> <refnamediv> <refname>openssl_free_key</refname> <refpurpose>Free key resource</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_free_key</methodname> <methodparam><type>resource</type><parameter>key_identifier</parameter></methodparam> @@ -17,6 +17,29 @@ the specified <parameter>key_identifier</parameter> from memory. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key_identifier</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml diff -u phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml Mon Jun 11 23:31:38 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-get-privatekey"> <refnamediv> <refname>openssl_get_privatekey</refname> @@ -14,6 +13,7 @@ <function>openssl_pkey_get_private</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml diff -u phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml Mon Jun 11 23:31:38 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-get-publickey"> <refnamediv> <refname>openssl_get_publickey</refname> @@ -14,6 +13,7 @@ <function>openssl_pkey_get_public</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-open.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-open.xml diff -u phpdoc/en/reference/openssl/functions/openssl-open.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-open.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-open.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-open.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-open"> <refnamediv> <refname>openssl_open</refname> <refpurpose>Open sealed data</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_open</methodname> <methodparam><type>string</type><parameter>sealed_data</parameter></methodparam> @@ -16,10 +16,6 @@ <methodparam><type>mixed</type><parameter>priv_key_id</parameter></methodparam> </methodsynopsis> <para> - &return.success; If successful the opened - data is returned in <parameter>open_data</parameter>. - </para> - <para> <function>openssl_open</function> opens (decrypts) <parameter>sealed_data</parameter> using the private key associated with the key identifier <parameter>priv_key_id</parameter> and the envelope key @@ -29,6 +25,55 @@ data are sealed and can only be used by one specific private key. See <function>openssl_seal</function> for more information. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>sealed_data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>open_data</parameter></term> + <listitem> + <para> + If the call is successful the opened data is returned in this + parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>env_key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_open</function> example</title> @@ -58,10 +103,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_seal</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_seal</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-pkcs7-decrypt"> <refnamediv> <refname>openssl_pkcs7_decrypt</refname> <refpurpose>Decrypts an S/MIME encrypted message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_decrypt</methodname> <methodparam><type>string</type><parameter>infilename</parameter></methodparam> @@ -21,9 +21,55 @@ associated private key specified by <parameter>recipcert</parameter> and <parameter>recipkey</parameter>. </para> - <para>The decrypted message is output to the - file specified by <parameter>outfilename</parameter> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>infilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + The decrypted message is written to the file specified by + <parameter>outfilename</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipcert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipkey</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_decrypt</function> example</title> @@ -46,6 +92,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.11 phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.12 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.11 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.openssl-pkcs7-encrypt"> <refnamediv> <refname>openssl_pkcs7_encrypt</refname> <refpurpose>Encrypt an S/MIME message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_encrypt</methodname> <methodparam><type>string</type><parameter>infile</parameter></methodparam> @@ -21,18 +21,105 @@ <function>openssl_pkcs7_encrypt</function> takes the contents of the file named <parameter>infile</parameter> and encrypts them using an RC2 40-bit cipher so that they can only be read by the intended recipients - specified by <parameter>recipcerts</parameter>, which is either a - lone X.509 certificate, or an array of X.509 certificates. - <parameter>headers</parameter> is an array of headers that - will be prepended to the data after it has been encrypted. - <parameter>flags</parameter> can be used to specify options that affect - the encoding process - see <link linkend="openssl.pkcs7.flags">PKCS7 - constants</link>. - <parameter>headers</parameter> can be either an associative array - keyed by header name, or an indexed array, where each element contains - a single header line. - Cipher can be selected with <parameter>cipherid</parameter> since PHP 5. + specified by <parameter>recipcerts</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>infile</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfile</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipcerts</parameter></term> + <listitem> + <para> + Either a lone X.509 certificate, or an array of X.509 certificates. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>headers</parameter></term> + <listitem> + <para> + <parameter>headers</parameter> is an array of headers that + will be prepended to the data after it has been encrypted. + </para> + <para> + <parameter>headers</parameter> can be either an associative array + keyed by header name, or an indexed array, where each element contains + a single header line. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to specify options that affect + the encoding process - see <link linkend="openssl.pkcs7.flags">PKCS7 + constants</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cipherid</parameter></term> + <listitem> + <para> + Cipher can be selected with <parameter>cipherid</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>cipherid</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_encrypt</function> example</title> @@ -74,8 +161,8 @@ </programlisting> </example> </para> - </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.15 phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.16 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.15 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.16 $ --> <refentry id="function.openssl-pkcs7-sign"> <refnamediv> <refname>openssl_pkcs7_sign</refname> <refpurpose>Sign an S/MIME message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_sign</methodname> <methodparam><type>string</type><parameter>infilename</parameter></methodparam> @@ -25,21 +25,84 @@ <parameter>signcert</parameter> and <parameter>privkey</parameter> parameters. </para> - <para><parameter>headers</parameter> is an array of headers that - will be prepended to the data after it has been signed (see - <function>openssl_pkcs7_encrypt</function> for more information about - the format of this parameter. - </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>flags</parameter> can be used to alter the output - see <link - linkend="openssl.pkcs7.flags">PKCS7 constants</link> - if not specified, - it defaults to PKCS7_DETACHED. + <variablelist> + <varlistentry> + <term><parameter>infilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signcert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>privkey</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>headers</parameter></term> + <listitem> + <para> + <parameter>headers</parameter> is an array of headers that + will be prepended to the data after it has been signed (see + <function>openssl_pkcs7_encrypt</function> for more information about + the format of this parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to alter the output - see <link + linkend="openssl.pkcs7.flags">PKCS7 constants</link> - if not specified, + it defaults to PKCS7_DETACHED. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extracerts</parameter></term> + <listitem> + <para> + <parameter>extracerts</parameter> specifies the name of a file containing + a bunch of extra certificates to include in the signature which can for + example be used to help the recipient to verify the certificate that you used. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <parameter>extracerts</parameter> specifies the name of a file containing - a bunch of extra certificates to include in the signature which can for - example be used to help the recipient to verify the certificate that you used. + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_sign</function> example</title> @@ -74,6 +137,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-pkcs7-verify"> <refnamediv> <refname>openssl_pkcs7_verify</refname> <refpurpose>Verifies the signature of an S/MIME signed message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>openssl_pkcs7_verify</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -19,37 +19,109 @@ </methodsynopsis> <para> <function>openssl_pkcs7_verify</function> reads the S/MIME message - contained in the filename specified by <parameter>filename</parameter> and - examines the digital signature. It returns &true; if the signature is - verified, &false; if it is not correct (the message has been tampered with, - or the signing certificate is invalid), or -1 on error. - </para> - <para> - <parameter>flags</parameter> can be used to affect how the signature is - verified - see <link linkend="openssl.pkcs7.flags">PKCS7 constants</link> - for more information. - </para> - <para> - If the <parameter>outfilename</parameter> is specified, it should be a - string holding the name of a file into which the certificates of the - persons that signed the messages will be stored in PEM format. + contained in the given file and examines the digital signature. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - If the <parameter>cainfo</parameter> is specified, it should hold - information about the trusted CA certificates to use in the verification - process - see <link linkend="openssl.cert.verification">certificate - verification</link> for more information about this parameter. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the message. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to affect how the signature is + verified - see <link linkend="openssl.pkcs7.flags">PKCS7 constants</link> + for more information. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + If the <parameter>outfilename</parameter> is specified, it should be a + string holding the name of a file into which the certificates of the + persons that signed the messages will be stored in PEM format. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cainfo</parameter></term> + <listitem> + <para> + If the <parameter>cainfo</parameter> is specified, it should hold + information about the trusted CA certificates to use in the verification + process - see <link linkend="openssl.cert.verification">certificate + verification</link> for more information about this parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extracerts</parameter></term> + <listitem> + <para> + If the <parameter>extracerts</parameter> is specified, it is the filename + of a file containing a bunch of certificates to use as untrusted CAs. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>content</parameter></term> + <listitem> + <para> + You can specify a filename with <parameter>content</parameter> that will + be filled with the verified data, but with the signature information + stripped. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - If the <parameter>extracerts</parameter> is specified, it is the filename - of a file containing a bunch of certificates to use as untrusted CAs. + Returns &true; if the signature is verified, &false; if it is not correct + (the message has been tampered with, or the signing certificate is invalid), + or -1 on error. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - You can specify a filename with <parameter>content</parameter> that will - be filled with the verified data, but with the signature information - stripped. This was added as of PHP 5.1.0. + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.1.0</entry> + <entry> + The <parameter>content</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-pkey-export-to-file"> <refnamediv> <refname>openssl_pkey_export_to_file</refname> <refpurpose>Gets an exportable representation of a key into a file </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkey_export_to_file</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> @@ -18,16 +18,61 @@ <para> <function>openssl_pkey_export_to_file</function> saves an ascii-armoured (PEM encoded) rendition of <parameter>key</parameter> into the file named - by <parameter>outfilename</parameter>. The key can be optionally - protected by a <parameter>passphrase</parameter>. - <parameter>configargs</parameter> can be used to fine-tune the export - process by specifying and/or overriding options for the openssl - configuration file. See <function>openssl_csr_new</function> for more - information about <parameter>configargs</parameter>. - &return.success; + by <parameter>outfilename</parameter>. </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The key can be optionally protected by a + <parameter>passphrase</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + <parameter>configargs</parameter> can be used to fine-tune the export + process by specifying and/or overriding options for the openssl + configuration file. See <function>openssl_csr_new</function> for more + information about <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.6 phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.7 --- phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.6 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.openssl-pkey-export"> <refnamediv> <refname>openssl_pkey_export</refname> <refpurpose>Gets an exportable representation of a key into a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkey_export</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> @@ -19,15 +19,58 @@ <function>openssl_pkey_export</function> exports <parameter>key</parameter> as a PEM encoded string and stores it into <parameter>out</parameter> (which is passed by reference). - The key is optionally protected by <parameter>passphrase</parameter>. - <parameter>configargs</parameter> can be used to fine-tune the export - process by specifying and/or overriding options for the openssl - configuration file. See <function>openssl_csr_new</function> for more - information about <parameter>configargs</parameter>. - &return.success; </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>out</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The key is optionally protected by <parameter>passphrase</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + <parameter>configargs</parameter> can be used to fine-tune the export + process by specifying and/or overriding options for the openssl + configuration file. See <function>openssl_csr_new</function> for more + information about <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.2 phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.3 --- phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.2 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml Mon Jun 11 23:31:38 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.openssl-pkey-free"> <refnamediv> <refname>openssl_pkey_free</refname> <refpurpose>Frees a private key</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_pkey_free</methodname> <methodparam><type>resource</type><parameter>key</parameter></methodparam> @@ -16,6 +17,29 @@ <function>openssl_pkey_new</function>. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.3 phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.4 --- phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.3 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml Mon Jun 11 23:31:38 2007 @@ -1,41 +1,64 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.4 $ --> <refentry id="function.openssl-pkey-get-private"> <refnamediv> <refname>openssl_pkey_get_private</refname> <refpurpose>Get a private key</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_get_private</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>passphrase</parameter></methodparam> </methodsynopsis> <para> - Returns a positive key resource identifier on success, or &false; on error. - </para> - <para> <function>openssl_get_privatekey</function> parses <parameter>key</parameter> and prepares it for use by other functions. + </para> + </refsect1> - <parameter>key</parameter> can be one of the following: - <orderedlist> - <listitem><simpara>a string having the format - <filename>file://path/to/file.pem</filename>. The named file must - contain a PEM encoded certificate/private key (it may contain both). - </simpara> - </listitem> - <listitem><simpara>A PEM formatted private key.</simpara></listitem> - </orderedlist> - + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> can be one of the following: + <orderedlist> + <listitem><simpara>a string having the format + <filename>file://path/to/file.pem</filename>. The named file must + contain a PEM encoded certificate/private key (it may contain both). + </simpara> + </listitem> + <listitem><simpara>A PEM formatted private key.</simpara></listitem> + </orderedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The optional parameter <parameter>passphrase</parameter> must be used + if the specified key is encrypted (protected by a passphrase). + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The optional parameter <parameter>passphrase</parameter> must be used if - the specified key is encrypted (protected by a passphrase). + Returns a positive key resource identifier on success, or &false; on error. </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.3 phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.4 --- phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.3 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml Mon Jun 11 23:31:38 2007 @@ -1,36 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.4 $ --> <refentry id="function.openssl-pkey-get-public"> <refnamediv> <refname>openssl_pkey_get_public</refname> <refpurpose>Extract public key from certificate and prepare it for use</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_get_public</methodname> <methodparam><type>mixed</type><parameter>certificate</parameter></methodparam> </methodsynopsis> <para> - Returns a positive key resource identifier on success, or &false; on error. + <function>openssl_get_publickey</function> extracts the public key from + <parameter>certificate</parameter> and prepares it for use by other + functions. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>openssl_get_publickey</function> extracts the - public key from <parameter>certificate</parameter> and - prepares it for use by other functions. - <parameter>certificate</parameter> can be one of the following: - <orderedlist> - <listitem><simpara>an X.509 certificate resource</simpara></listitem> - <listitem><simpara>a string having the format - <filename>file://path/to/file.pem</filename>. The named file must - contain a PEM encoded certificate/private key (it may contain both). - </simpara> - </listitem> - <listitem><simpara>A PEM formatted private key.</simpara></listitem> - </orderedlist> + <variablelist> + <varlistentry> + <term><parameter>certificate</parameter></term> + <listitem> + <para> + <parameter>certificate</parameter> can be one of the following: + <orderedlist> + <listitem><simpara>an X.509 certificate resource</simpara></listitem> + <listitem><simpara>a string having the format + <filename>file://path/to/file.pem</filename>. The named file must + contain a PEM encoded certificate/private key (it may contain both). + </simpara> + </listitem> + <listitem><simpara>A PEM formatted private key.</simpara></listitem> + </orderedlist> + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a positive key resource identifier on success, or &false; on error. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-pkey-new"> <refnamediv> <refname>openssl_pkey_new</refname> <refpurpose>Generates a new private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_new</methodname> <methodparam choice="opt"><type>array</type><parameter>configargs</parameter></methodparam> @@ -16,13 +16,37 @@ <function>openssl_pkey_new</function> generates a new private and public key pair. The public component of the key can be obtained using <function>openssl_pkey_get_public</function>. - You can finetune the key generation (such as specifying the number of - bits) using <parameter>configargs</parameter>. See - <function>openssl_csr_new</function> for more information about - <parameter>configargs</parameter>. </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + You can finetune the key generation (such as specifying the number of + bits) using <parameter>configargs</parameter>. See + <function>openssl_csr_new</function> for more information about + <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a resource identifier for the pkey on success, or &false; on + error. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-private-decrypt"> <refnamediv> <refname>openssl_private_decrypt</refname> <refpurpose>Decrypts data with private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_private_decrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,26 +19,74 @@ <function>openssl_private_decrypt</function> decrypts <parameter>data</parameter> that was previous encrypted via <function>openssl_public_encrypt</function> and stores the result into - <parameter>decrypted</parameter>. <parameter>key</parameter> must be the - private key corresponding that was used to encrypt the - data. <parameter>padding</parameter> defaults to - <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of - <constant>OPENSSL_SSLV23_PADDING</constant>, - <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <parameter>decrypted</parameter>. </para> <para> You can use this function e.g. to decrypt data which were supposed only to you. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_public_encrypt</function> and - <function>openssl_public_decrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>decrypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> must be the private key corresponding that + was used to encrypt the data. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of + <constant>OPENSSL_SSLV23_PADDING</constant>, + <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_public_encrypt</function></member> + <member><function>openssl_public_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-private-encrypt"> <refnamediv> <refname>openssl_private_encrypt</refname> <refpurpose>Encrypts data with private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_private_encrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,22 +19,70 @@ <function>openssl_private_encrypt</function> encrypts <parameter>data</parameter> with private <parameter>key</parameter> and stores the result into <parameter>crypted</parameter>. Encrypted data can be decrypted via - <function>openssl_public_decrypt</function>. <parameter>padding</parameter> - defaults to <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <function>openssl_public_decrypt</function>. </para> <para> This function can be used e.g. to sign data (or its hash) to prove that it is not written by someone else. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_public_decrypt</function> and - <function>openssl_public_encrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>crypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_public_encrypt</function></member> + <member><function>openssl_public_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-public-decrypt"> <refnamediv> <refname>openssl_public_decrypt</refname> <refpurpose>Decrypts data with public key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_public_decrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,24 +19,72 @@ <function>openssl_public_decrypt</function> decrypts <parameter>data</parameter> that was previous encrypted via <function>openssl_private_encrypt</function> and stores the result into - <parameter>decrypted</parameter>. <parameter>key</parameter> must be the - public key corresponding that was used to encrypt the - data. <parameter>padding</parameter> defaults to - <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <parameter>decrypted</parameter>. </para> <para> You can use this function e.g. to check if the message was written by the owner of the private key. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_private_encrypt</function> and - <function>openssl_private_decrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>decrypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> must be the public key corresponding that + was used to encrypt the data. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_private_encrypt</function></member> + <member><function>openssl_private_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-public-encrypt"> <refnamediv> <refname>openssl_public_encrypt</refname> <refpurpose>Encrypts data with public key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_public_encrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,25 +19,75 @@ <function>openssl_public_encrypt</function> encrypts <parameter>data</parameter> with public <parameter>key</parameter> and stores the result into <parameter>crypted</parameter>. Encrypted data can be decrypted via - <function>openssl_private_decrypt</function>. <parameter>padding</parameter> - defaults to <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - one of <constant>OPENSSL_SSLV23_PADDING</constant>, - <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <function>openssl_private_decrypt</function>. </para> <para> This function can be used e.g. to encrypt message which can be then read only by owner of the private key. It can be also used to store secure data in database. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_private_decrypt</function> and - <function>openssl_private_encrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>crypted</parameter></term> + <listitem> + <para> + This will hold the result of the encryption. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + The public key. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of + <constant>OPENSSL_SSLV23_PADDING</constant>, + <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_private_encrypt</function></member> + <member><function>openssl_private_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-seal.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-seal.xml diff -u phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-seal.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-seal"> <refnamediv> <refname>openssl_seal</refname> <refpurpose>Seal (encrypt) data</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_seal</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,13 +16,6 @@ <methodparam><type>array</type><parameter>pub_key_ids</parameter></methodparam> </methodsynopsis> <para> - Returns the length of the sealed data on success, or &false; on error. - If successful the sealed data is returned in - <parameter>sealed_data</parameter>, and the envelope keys in - <parameter>env_keys</parameter>. - - </para> - <para> <function>openssl_seal</function> seals (encrypts) <parameter>data</parameter> by using RC4 with a randomly generated secret key. The key is encrypted with each of the public keys @@ -33,6 +26,56 @@ public keys). Each recipient must receive both the sealed data and the envelope key that was encrypted with the recipient's public key. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>sealed_data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>env_keys</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>pub_key_ids</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the length of the sealed data on success, or &false; on error. + If successful the sealed data is returned in + <parameter>sealed_data</parameter>, and the envelope keys in + <parameter>env_keys</parameter>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_seal</function> example</title> @@ -64,10 +107,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_open</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_open</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-sign.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.10 phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.11 --- phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.10 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.openssl-sign"> <refnamediv> <refname>openssl_sign</refname> <refpurpose>Generate signature</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_sign</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,25 +16,88 @@ <methodparam choice="opt"><type>int</type><parameter>signature_alg</parameter></methodparam> </methodsynopsis> <para> - &return.success; - If successful the signature is returned in - <parameter>signature</parameter>. - </para> - <para> <function>openssl_sign</function> computes a signature for the specified <parameter>data</parameter> by using SHA1 for hashing followed by encryption using the private key associated with <parameter>priv_key_id</parameter>. Note that the data itself is not encrypted. </para> - <note> - <para> - Optional 4th parameter <parameter>signature_alg</parameter> was added in - version 5.0.0. Its default value is - <constant>OPENSSL_ALGO_SHA1</constant>. For more information see the - list of <link linkend="openssl.signature-algos">Signature Algorithms</link>. - </para> - </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature</parameter></term> + <listitem> + <para> + If the call was successful the signature is returned in + <parameter>signature</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature_alg</parameter></term> + <listitem> + <para> + Defaults to <constant>OPENSSL_ALGO_SHA1</constant>. For more + information see the list of <link + linkend="openssl.signature-algos">Signature Algorithms</link>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>signature_alg</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_sign</function> example</title> @@ -59,10 +122,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_verify</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_verify</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-verify.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-verify.xml diff -u phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-verify.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-verify"> <refnamediv> <refname>openssl_verify</refname> <refpurpose>Verify signature</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_verify</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,24 +16,87 @@ <methodparam choice="opt"><type>int</type><parameter>signature_alg</parameter></methodparam> </methodsynopsis> <para> - Returns 1 if the signature is correct, 0 if it is incorrect, and - -1 on error. - </para> - <para> <function>openssl_verify</function> verifies that the <parameter>signature</parameter> is correct for the specified <parameter>data</parameter> using the public key associated with <parameter>pub_key_id</parameter>. This must be the public key corresponding to the private key used for signing. </para> - <note> - <para> - Optional 4th parameter <parameter>signature_alg</parameter> was added in - version 5.2.0. Its default value is - <constant>OPENSSL_ALGO_SHA1</constant>. For more information see the - list of <link linkend="openssl.signature-algos">Signature Algorithms</link>. - </para> - </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>pub_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature_alg</parameter></term> + <listitem> + <para> + Defaults to <constant>OPENSSL_ALGO_SHA1</constant>. For more + information see the list of <link + linkend="openssl.signature-algos">Signature Algorithms</link>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns 1 if the signature is correct, 0 if it is incorrect, and + -1 on error. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>signature_alg</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_verify</function> example</title> @@ -64,10 +127,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.4 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml Mon Jun 11 23:31:38 2007 @@ -1,24 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-x509-check-private-key"> <refnamediv> <refname>openssl_x509_check_private_key</refname> <refpurpose>Checks if a private key corresponds to a certificate</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_check_private_key</methodname> <methodparam><type>mixed</type><parameter>cert</parameter></methodparam> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> </methodsynopsis> <para> - <function>openssl_x509_check_private_key</function> returns &true; if - <parameter>key</parameter> is the private key that corresponds to - <parameter>cert</parameter>, or &false; otherwise. + Checks wether the given <parameter>key</parameter> is the private key + that corresponds to <parameter>cert</parameter>. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>cert</parameter></term> + <listitem> + <para> + The certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + The private key. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if <parameter>key</parameter> is the private key that + corresponds to <parameter>cert</parameter>, or &false; otherwise. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-checkpurpose"> <refnamediv> <refname>openssl_x509_checkpurpose</refname> <refpurpose>Verifies if a certificate can be used for a particular purpose</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_x509_checkpurpose</methodname> <methodparam><type>mixed</type><parameter>x509cert</parameter></methodparam> @@ -16,72 +16,107 @@ <methodparam choice="opt"><type>string</type><parameter>untrustedfile</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the certificate can be used for the intended purpose, - &false; if it cannot, or -1 on error. - </para> - <para> - <function>openssl_x509_checkpurpose</function> examines the certificate - specified by <parameter>x509cert</parameter> to see if it can be used for - the purpose specified by <parameter>purpose</parameter>. + <function>openssl_x509_checkpurpose</function> examines a certificate to + see if it can be used for the specified <parameter>purpose</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>cainfo</parameter> should be an array of trusted CA files/dirs - as described in <link linkend="openssl.cert.verification">Certificate - Verification</link>. It defaults to an empty array. - </para> - <para><parameter>untrustedfile</parameter>, if specified, - is the name of a PEM encoded file holding certificates that can be used to - help verify the certificate, although no trust in placed in the - certificates that come from that file. + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + The examined certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>purpose</parameter></term> + <listitem> + <para> + <table> + <title><function>openssl_x509_checkpurpose</function> purposes</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Constant</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>X509_PURPOSE_SSL_CLIENT</entry> + <entry>Can the certificate be used for the client side of an SSL + connection?</entry> + </row> + <row> + <entry>X509_PURPOSE_SSL_SERVER</entry> + <entry>Can the certificate be used for the server side of an SSL + connection?</entry> + </row> + <row> + <entry>X509_PURPOSE_NS_SSL_SERVER</entry> + <entry>Can the cert be used for Netscape SSL server?</entry> + </row> + <row> + <entry>X509_PURPOSE_SMIME_SIGN</entry> + <entry>Can the cert be used to sign S/MIME email?</entry> + </row> + <row> + <entry>X509_PURPOSE_SMIME_ENCRYPT</entry> + <entry>Can the cert be used to encrypt S/MIME email?</entry> + </row> + <row> + <entry>X509_PURPOSE_CRL_SIGN</entry> + <entry>Can the cert be used to sign a certificate revocation list + (CRL)?</entry> + </row> + <row> + <entry>X509_PURPOSE_ANY</entry> + <entry>Can the cert be used for Any/All purposes?</entry> + </row> + </tbody> + </tgroup> + </table> + These options are not bitfields - you may specify one only! + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cainfo</parameter></term> + <listitem> + <para> + <parameter>cainfo</parameter> should be an array of trusted CA files/dirs + as described in <link linkend="openssl.cert.verification">Certificate + Verification</link>. It defaults to an empty array. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>untrustedfile</parameter></term> + <listitem> + <para> + If specified, this should be the name of a PEM encoded file holding + certificates that can be used to help verify the certificate, although + no trust in placed in the certificates that come from that file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <table> - <title><function>openssl_x509_checkpurpose</function> purposes</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Constant</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>X509_PURPOSE_SSL_CLIENT</entry> - <entry>Can the certificate be used for the client side of an SSL - connection?</entry> - </row> - <row> - <entry>X509_PURPOSE_SSL_SERVER</entry> - <entry>Can the certificate be used for the server side of an SSL - connection?</entry> - </row> - <row> - <entry>X509_PURPOSE_NS_SSL_SERVER</entry> - <entry>Can the cert be used for Netscape SSL server?</entry> - </row> - <row> - <entry>X509_PURPOSE_SMIME_SIGN</entry> - <entry>Can the cert be used to sign S/MIME email?</entry> - </row> - <row> - <entry>X509_PURPOSE_SMIME_ENCRYPT</entry> - <entry>Can the cert be used to encrypt S/MIME email?</entry> - </row> - <row> - <entry>X509_PURPOSE_CRL_SIGN</entry> - <entry>Can the cert be used to sign a certificate revocation list - (CRL)?</entry> - </row> - <row> - <entry>X509_PURPOSE_ANY</entry> - <entry>Can the cert be used for Any/All purposes?</entry> - </row> - </tbody> - </tgroup> - </table> - These options are not bitfields - you may specify one only! + Returns &true; if the certificate can be used for the intended purpose, + &false; if it cannot, or -1 on error. </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-export-to-file"> <refnamediv> <refname>openssl_x509_export_to_file</refname> <refpurpose>Exports a certificate to file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_export_to_file</methodname> <methodparam><type>mixed</type><parameter>x509</parameter></methodparam> @@ -19,11 +19,44 @@ <parameter>x509</parameter> into a file named by <parameter>outfilename</parameter> in a PEM encoded format. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-export.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-export"> <refnamediv> <refname>openssl_x509_export</refname> <refpurpose>Exports a certificate as a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_export</methodname> <methodparam><type>mixed</type><parameter>x509</parameter></methodparam> @@ -19,11 +19,44 @@ <parameter>x509</parameter> into a string named by <parameter>output</parameter> in a PEM encoded format. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>output</parameter></term> + <listitem> + <para> + On success, this will hold the PEM. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-free.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-free.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-free.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-x509-free"> <refnamediv> <refname>openssl_x509_free</refname> <refpurpose>Free certificate resource</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_x509_free</methodname> <methodparam><type>resource</type><parameter>x509cert</parameter></methodparam> @@ -17,6 +17,29 @@ with the specified <parameter>x509cert</parameter> resource from memory. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.6 phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.7 --- phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.6 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml Mon Jun 11 23:31:38 2007 @@ -1,14 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.openssl-x509-parse"> <refnamediv> <refname>openssl_x509_parse</refname> - <refpurpose>Parse an X509 certificate and return the information as an - array</refpurpose> + <refpurpose>Parse an X509 certificate and return the information as an array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>openssl_x509_parse</methodname> <methodparam><type>mixed</type><parameter>x509cert</parameter></methodparam> @@ -18,16 +17,43 @@ <function>openssl_x509_parse</function> returns information about the supplied <parameter>x509cert</parameter>, including fields such as subject name, issuer name, purposes, valid from and valid to dates etc. - <parameter>shortnames</parameter> controls how the data is indexed in the - array - if <parameter>shortnames</parameter> is &true; (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. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>shortnames</parameter></term> + <listitem> + <para> + <parameter>shortnames</parameter> controls how the data is indexed in the + array - if <parameter>shortnames</parameter> is &true; (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. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> <emphasis>The structure of the returned data is (deliberately) not yet documented, as it is still subject to change.</emphasis> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-read.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-read.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-read.xml Mon Jun 11 23:31:38 2007 @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-x509-read"> <refnamediv> <refname>openssl_x509_read</refname> <refpurpose>Parse an X.509 certificate and return a resource identifier for it</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_x509_read</methodname> <methodparam><type>mixed</type><parameter>x509certdata</parameter></methodparam> @@ -19,6 +19,29 @@ it. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509certdata</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a resource identifier on success, or &false; on failure. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-csr-export-to-file"> <refnamediv> <refname>openssl_csr_export_to_file</refname> <refpurpose>Exports a CSR to a file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_csr_export_to_file</methodname> <methodparam><type>resource</type><parameter>csr</parameter></methodparam> @@ -19,16 +19,55 @@ Signing Request represented by <parameter>csr</parameter> and saves it as ascii-armoured text into the file named by <parameter>outfilename</parameter>. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> - <simpara> - See also <function>openssl_csr_export</function>, - <function>openssl_csr_new</function> and - <function>openssl_csr_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_csr_export</function></member> + <member><function>openssl_csr_new</function></member> + <member><function>openssl_csr_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-export.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-csr-export.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-csr-export"> <refnamediv> <refname>openssl_csr_export</refname> <refpurpose>Exports a CSR as a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_csr_export</methodname> <methodparam><type>resource</type><parameter>csr</parameter></methodparam> @@ -20,16 +20,54 @@ ascii-armoured text into <parameter>out</parameter>, which is passed by reference. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>out</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> - <simpara> - See also <function>openssl_csr_export_to_file</function>, - <function>openssl_csr_new</function> and - <function>openssl_csr_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_csr_export_to_file</function></member> + <member><function>openssl_csr_new</function></member> + <member><function>openssl_csr_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-new.xml?r1=1.16&r2=1.17&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-new.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.16 phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.17 --- phpdoc/en/reference/openssl/functions/openssl-csr-new.xml:1.16 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-new.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.17 $ --> <refentry id="function.openssl-csr-new"> <refnamediv> <refname>openssl_csr_new</refname> <refpurpose>Generates a CSR</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>openssl_csr_new</methodname> <methodparam><type>array</type><parameter>dn</parameter></methodparam> @@ -20,98 +20,135 @@ based on the information provided by <parameter>dn</parameter>, which represents the Distinguished Name to be used in the certificate. </para> + &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>privkey</parameter> should be set to a private key that was - previously generated by <function>openssl_pkey_new</function> (or - otherwise obtained from the other openssl_pkey family of functions). - The corresponding public portion of the key will be used to sign the - CSR. - </para> - <para> - <parameter>extraattribs</parameter> is used to specify additional - configuration options for the CSR. Both <parameter>dn</parameter> and - <parameter>extraattribs</parameter> are associative arrays whose keys are - converted to OIDs and applied to the relevant part of the request. + <variablelist> + <varlistentry> + <term><parameter>dn</parameter></term> + <listitem> + <para> + The Distinguished Name to be used in the certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>privkey</parameter></term> + <listitem> + <para> + <parameter>privkey</parameter> should be set to a private key that was + previously generated by <function>openssl_pkey_new</function> (or + otherwise obtained from the other openssl_pkey family of functions). + The corresponding public portion of the key will be used to sign the + CSR. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + By default, the information in your system <literal>openssl.conf</literal> + is used to initialize the request; you can specify a configuration file + section by setting the <literal>config_section_section</literal> key of + <parameter>configargs</parameter>. You can also specify an alternative + openssl configuration file by setting the value of the + <literal>config</literal> key to the path of the file you want to use. + The following keys, if present in <parameter>configargs</parameter> + behave as their equivalents in the <literal>openssl.conf</literal>, as + listed in the table below. + <table> + <title>Configuration overrides</title> + <tgroup cols="3"> + <thead> + <row> + <entry><parameter>configargs</parameter> key</entry> + <entry>type</entry> + <entry><literal>openssl.conf</literal> equivalent</entry> + <entry>description</entry> + </row> + </thead> + <tbody> + <row> + <entry>digest_alg</entry> + <entry><type>string</type></entry> + <entry>default_md</entry> + <entry>Selects which digest method to use</entry> + </row> + <row> + <entry>x509_extensions</entry> + <entry><type>string</type></entry> + <entry>x509_extensions</entry> + <entry>Selects which extensions should be used when creating an x509 + certificate</entry> + </row> + <row> + <entry>req_extensions</entry> + <entry><type>string</type></entry> + <entry>req_extensions</entry> + <entry>Selects which extensions should be used when creating a CSR</entry> + </row> + <row> + <entry>private_key_bits</entry> + <entry><type>integer</type></entry> + <entry>default_bits</entry> + <entry>Specifies how many bits should be used to generate a private + key</entry> + </row> + <row> + <entry>private_key_type</entry> + <entry><type>integer</type></entry> + <entry>none</entry> + <entry>Specifies the type of private key to create. This can be one + of <constant>OPENSSL_KEYTYPE_DSA</constant>, + <constant>OPENSSL_KEYTYPE_DH</constant> or + <constant>OPENSSL_KEYTYPE_RSA</constant>. + The default value is <constant>OPENSSL_KEYTYPE_RSA</constant> which + is currently the only supported key type. + </entry> + </row> + <row> + <entry>encrypt_key</entry> + <entry><type>boolean</type></entry> + <entry>encrypt_key</entry> + <entry>Should an exported key (with passphrase) be encrypted?</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extraattribs</parameter></term> + <listitem> + <para> + <parameter>extraattribs</parameter> is used to specify additional + configuration options for the CSR. Both <parameter>dn</parameter> and + <parameter>extraattribs</parameter> are associative arrays whose keys are + converted to OIDs and applied to the relevant part of the request. + </para> + </listitem> + </varlistentry> + </variablelist> </para> - &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - By default, the information in your system <literal>openssl.conf</literal> - is used to initialize the request; you can specify a configuration file - section by setting the <literal>config_section_section</literal> key of - <parameter>configargs</parameter>. You can also specify an alternative - openssl configuration file by setting the value of the - <literal>config</literal> key to the path of the file you want to use. - The following keys, if present in <parameter>configargs</parameter> - behave as their equivalents in the <literal>openssl.conf</literal>, as - listed in the table below. - - <table> - <title>Configuration overrides</title> - <tgroup cols="3"> - <thead> - <row> - <entry><parameter>configargs</parameter> key</entry> - <entry>type</entry> - <entry><literal>openssl.conf</literal> equivalent</entry> - <entry>description</entry> - </row> - </thead> - <tbody> - <row> - <entry>digest_alg</entry> - <entry><type>string</type></entry> - <entry>default_md</entry> - <entry>Selects which digest method to use</entry> - </row> - <row> - <entry>x509_extensions</entry> - <entry><type>string</type></entry> - <entry>x509_extensions</entry> - <entry>Selects which extensions should be used when creating an x509 - certificate</entry> - </row> - <row> - <entry>req_extensions</entry> - <entry><type>string</type></entry> - <entry>req_extensions</entry> - <entry>Selects which extensions should be used when creating a CSR</entry> - </row> - <row> - <entry>private_key_bits</entry> - <entry><type>integer</type></entry> - <entry>default_bits</entry> - <entry>Specifies how many bits should be used to generate a private - key</entry> - </row> - <row> - <entry>private_key_type</entry> - <entry><type>integer</type></entry> - <entry>none</entry> - <entry>Specifies the type of private key to create. This can be one - of <constant>OPENSSL_KEYTYPE_DSA</constant>, - <constant>OPENSSL_KEYTYPE_DH</constant> or - <constant>OPENSSL_KEYTYPE_RSA</constant>. - The default value is <constant>OPENSSL_KEYTYPE_RSA</constant> which - is currently the only supported key type. - </entry> - </row> - <row> - <entry>encrypt_key</entry> - <entry><type>boolean</type></entry> - <entry>encrypt_key</entry> - <entry>Should an exported key (with passphrase) be encrypted?</entry> - </row> - </tbody> - </tgroup> - </table> + Returns the CSR. </para> - <simpara> - &return.success; - </simpara> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title><function>openssl_csr_new</function> example - creating a - self-signed-certificate</title> + <title>Creating a self-signed-certificate</title> <programlisting role="php"> <![CDATA[ <?php @@ -165,6 +202,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.11 phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.12 --- phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml:1.11 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-csr-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.openssl-csr-sign"> <refnamediv> <refname>openssl_csr_sign</refname> <refpurpose>Sign a CSR with another certificate (or itself) and generate a certificate</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_csr_sign</methodname> <methodparam><type>mixed</type><parameter>csr</parameter></methodparam> @@ -19,28 +19,110 @@ </methodsynopsis> <para> <function>openssl_csr_sign</function> generates an x509 certificate - resource from the <parameter>csr</parameter> previously generated by - <function>openssl_csr_new</function>, but it can also be the path to - a PEM encoded CSR when specified as - <filename>file://path/to/csr</filename> or an exported string generated - by <function>openssl_csr_export</function>. - The generated certificate will be signed by - <parameter>cacert</parameter>. If <parameter>cacert</parameter> is &null;, - the generated certificate will be a self-signed certificate. - <parameter>priv_key</parameter> is the private key that corresponds to - <parameter>cacert</parameter>. - <parameter>days</parameter> specifies the length of time for which the - generated certificate will be valid, in days. - You can finetune the CSR signing by <parameter>configargs</parameter>. - See <function>openssl_csr_new</function> for more information about - <parameter>configargs</parameter>. - Since PHP 4.3.3 you can specify the serial number of issued certificate by - <parameter>serial</parameter>. In earlier versions, it was always 0. + resource from the given CSR. </para> + &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>csr</parameter></term> + <listitem> + <para> + A CSR previously generated by <function>openssl_csr_new</function>. + It can also be the path to a PEM encoded CSR when specified as + <filename>file://path/to/csr</filename> or an exported string generated + by <function>openssl_csr_export</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cacert</parameter></term> + <listitem> + <para> + The generated certificate will be signed by <parameter>cacert</parameter>. + If <parameter>cacert</parameter> is &null;, the generated certificate + will be a self-signed certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key</parameter></term> + <listitem> + <para> + <parameter>priv_key</parameter> is the private key that corresponds to + <parameter>cacert</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>days</parameter></term> + <listitem> + <para> + <parameter>days</parameter> specifies the length of time for which the + generated certificate will be valid, in days. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + You can finetune the CSR signing by <parameter>configargs</parameter>. + See <function>openssl_csr_new</function> for more information about + <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>serial</parameter></term> + <listitem> + <para> + An optional the serial number of issued certificate. If not specified + it will default to 0. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> Returns an x509 certificate resource on success, &false; on failure. </para> - &reference.openssl.note-openssl-cnf; + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.3</entry> + <entry> + The <parameter>serial</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_csr_sign</function> example - signing a @@ -79,6 +161,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-error-string.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-error-string.xml diff -u phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-error-string.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-error-string.xml Mon Jun 11 23:31:38 2007 @@ -1,26 +1,34 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-error-string"> <refnamediv> <refname>openssl_error_string</refname> <refpurpose>Return openSSL error message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>string</type><methodname>openssl_error_string</methodname> <void/> </methodsynopsis> <para> - Returns an error message string, or &false; if there are no more error - messages to return. - </para> - <para> <function>openssl_error_string</function> returns the last error from the openSSL library. Error messages are stacked, so this function should be called multiple times to collect all of the information. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns an error message string, or &false; if there are no more error + messages to return. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_error_string</function> example</title> @@ -36,6 +44,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-free-key.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-free-key.xml diff -u phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-free-key.xml:1.4 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-free-key.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-free-key"> <refnamediv> <refname>openssl_free_key</refname> <refpurpose>Free key resource</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_free_key</methodname> <methodparam><type>resource</type><parameter>key_identifier</parameter></methodparam> @@ -17,6 +17,29 @@ the specified <parameter>key_identifier</parameter> from memory. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key_identifier</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml diff -u phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/openssl/functions/openssl-get-privatekey.xml Mon Jun 11 23:31:38 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-get-privatekey"> <refnamediv> <refname>openssl_get_privatekey</refname> @@ -14,6 +13,7 @@ <function>openssl_pkey_get_private</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml diff -u phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml:1.4 Mon Apr 25 16:17:01 2005 +++ phpdoc/en/reference/openssl/functions/openssl-get-publickey.xml Mon Jun 11 23:31:38 2007 @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-get-publickey"> <refnamediv> <refname>openssl_get_publickey</refname> @@ -14,6 +13,7 @@ <function>openssl_pkey_get_public</function>. </simpara> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-open.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-open.xml diff -u phpdoc/en/reference/openssl/functions/openssl-open.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-open.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-open.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-open.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-open"> <refnamediv> <refname>openssl_open</refname> <refpurpose>Open sealed data</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_open</methodname> <methodparam><type>string</type><parameter>sealed_data</parameter></methodparam> @@ -16,10 +16,6 @@ <methodparam><type>mixed</type><parameter>priv_key_id</parameter></methodparam> </methodsynopsis> <para> - &return.success; If successful the opened - data is returned in <parameter>open_data</parameter>. - </para> - <para> <function>openssl_open</function> opens (decrypts) <parameter>sealed_data</parameter> using the private key associated with the key identifier <parameter>priv_key_id</parameter> and the envelope key @@ -29,6 +25,55 @@ data are sealed and can only be used by one specific private key. See <function>openssl_seal</function> for more information. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>sealed_data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>open_data</parameter></term> + <listitem> + <para> + If the call is successful the opened data is returned in this + parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>env_key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_open</function> example</title> @@ -58,10 +103,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_seal</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_seal</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-pkcs7-decrypt"> <refnamediv> <refname>openssl_pkcs7_decrypt</refname> <refpurpose>Decrypts an S/MIME encrypted message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_decrypt</methodname> <methodparam><type>string</type><parameter>infilename</parameter></methodparam> @@ -21,9 +21,55 @@ associated private key specified by <parameter>recipcert</parameter> and <parameter>recipkey</parameter>. </para> - <para>The decrypted message is output to the - file specified by <parameter>outfilename</parameter> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>infilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + The decrypted message is written to the file specified by + <parameter>outfilename</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipcert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipkey</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_decrypt</function> example</title> @@ -46,6 +92,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml?r1=1.11&r2=1.12&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.11 phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.12 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml:1.11 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.11 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.12 $ --> <refentry id="function.openssl-pkcs7-encrypt"> <refnamediv> <refname>openssl_pkcs7_encrypt</refname> <refpurpose>Encrypt an S/MIME message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_encrypt</methodname> <methodparam><type>string</type><parameter>infile</parameter></methodparam> @@ -21,18 +21,105 @@ <function>openssl_pkcs7_encrypt</function> takes the contents of the file named <parameter>infile</parameter> and encrypts them using an RC2 40-bit cipher so that they can only be read by the intended recipients - specified by <parameter>recipcerts</parameter>, which is either a - lone X.509 certificate, or an array of X.509 certificates. - <parameter>headers</parameter> is an array of headers that - will be prepended to the data after it has been encrypted. - <parameter>flags</parameter> can be used to specify options that affect - the encoding process - see <link linkend="openssl.pkcs7.flags">PKCS7 - constants</link>. - <parameter>headers</parameter> can be either an associative array - keyed by header name, or an indexed array, where each element contains - a single header line. - Cipher can be selected with <parameter>cipherid</parameter> since PHP 5. + specified by <parameter>recipcerts</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>infile</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfile</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>recipcerts</parameter></term> + <listitem> + <para> + Either a lone X.509 certificate, or an array of X.509 certificates. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>headers</parameter></term> + <listitem> + <para> + <parameter>headers</parameter> is an array of headers that + will be prepended to the data after it has been encrypted. + </para> + <para> + <parameter>headers</parameter> can be either an associative array + keyed by header name, or an indexed array, where each element contains + a single header line. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to specify options that affect + the encoding process - see <link linkend="openssl.pkcs7.flags">PKCS7 + constants</link>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cipherid</parameter></term> + <listitem> + <para> + Cipher can be selected with <parameter>cipherid</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>cipherid</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_encrypt</function> example</title> @@ -74,8 +161,8 @@ </programlisting> </example> </para> - </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml?r1=1.15&r2=1.16&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.15 phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.16 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml:1.15 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.15 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.16 $ --> <refentry id="function.openssl-pkcs7-sign"> <refnamediv> <refname>openssl_pkcs7_sign</refname> <refpurpose>Sign an S/MIME message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkcs7_sign</methodname> <methodparam><type>string</type><parameter>infilename</parameter></methodparam> @@ -25,21 +25,84 @@ <parameter>signcert</parameter> and <parameter>privkey</parameter> parameters. </para> - <para><parameter>headers</parameter> is an array of headers that - will be prepended to the data after it has been signed (see - <function>openssl_pkcs7_encrypt</function> for more information about - the format of this parameter. - </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>flags</parameter> can be used to alter the output - see <link - linkend="openssl.pkcs7.flags">PKCS7 constants</link> - if not specified, - it defaults to PKCS7_DETACHED. + <variablelist> + <varlistentry> + <term><parameter>infilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signcert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>privkey</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>headers</parameter></term> + <listitem> + <para> + <parameter>headers</parameter> is an array of headers that + will be prepended to the data after it has been signed (see + <function>openssl_pkcs7_encrypt</function> for more information about + the format of this parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to alter the output - see <link + linkend="openssl.pkcs7.flags">PKCS7 constants</link> - if not specified, + it defaults to PKCS7_DETACHED. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extracerts</parameter></term> + <listitem> + <para> + <parameter>extracerts</parameter> specifies the name of a file containing + a bunch of extra certificates to include in the signature which can for + example be used to help the recipient to verify the certificate that you used. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <parameter>extracerts</parameter> specifies the name of a file containing - a bunch of extra certificates to include in the signature which can for - example be used to help the recipient to verify the certificate that you used. + &return.success; </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_pkcs7_sign</function> example</title> @@ -74,6 +137,7 @@ </example> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkcs7-verify.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-pkcs7-verify"> <refnamediv> <refname>openssl_pkcs7_verify</refname> <refpurpose>Verifies the signature of an S/MIME signed message</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>openssl_pkcs7_verify</methodname> <methodparam><type>string</type><parameter>filename</parameter></methodparam> @@ -19,37 +19,109 @@ </methodsynopsis> <para> <function>openssl_pkcs7_verify</function> reads the S/MIME message - contained in the filename specified by <parameter>filename</parameter> and - examines the digital signature. It returns &true; if the signature is - verified, &false; if it is not correct (the message has been tampered with, - or the signing certificate is invalid), or -1 on error. - </para> - <para> - <parameter>flags</parameter> can be used to affect how the signature is - verified - see <link linkend="openssl.pkcs7.flags">PKCS7 constants</link> - for more information. - </para> - <para> - If the <parameter>outfilename</parameter> is specified, it should be a - string holding the name of a file into which the certificates of the - persons that signed the messages will be stored in PEM format. + contained in the given file and examines the digital signature. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - If the <parameter>cainfo</parameter> is specified, it should hold - information about the trusted CA certificates to use in the verification - process - see <link linkend="openssl.cert.verification">certificate - verification</link> for more information about this parameter. + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para> + Path to the message. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>flags</parameter></term> + <listitem> + <para> + <parameter>flags</parameter> can be used to affect how the signature is + verified - see <link linkend="openssl.pkcs7.flags">PKCS7 constants</link> + for more information. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + If the <parameter>outfilename</parameter> is specified, it should be a + string holding the name of a file into which the certificates of the + persons that signed the messages will be stored in PEM format. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cainfo</parameter></term> + <listitem> + <para> + If the <parameter>cainfo</parameter> is specified, it should hold + information about the trusted CA certificates to use in the verification + process - see <link linkend="openssl.cert.verification">certificate + verification</link> for more information about this parameter. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extracerts</parameter></term> + <listitem> + <para> + If the <parameter>extracerts</parameter> is specified, it is the filename + of a file containing a bunch of certificates to use as untrusted CAs. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>content</parameter></term> + <listitem> + <para> + You can specify a filename with <parameter>content</parameter> that will + be filled with the verified data, but with the signature information + stripped. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - If the <parameter>extracerts</parameter> is specified, it is the filename - of a file containing a bunch of certificates to use as untrusted CAs. + Returns &true; if the signature is verified, &false; if it is not correct + (the message has been tampered with, or the signing certificate is invalid), + or -1 on error. </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; <para> - You can specify a filename with <parameter>content</parameter> that will - be filled with the verified data, but with the signature information - stripped. This was added as of PHP 5.1.0. + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.1.0</entry> + <entry> + The <parameter>content</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-pkey-export-to-file"> <refnamediv> <refname>openssl_pkey_export_to_file</refname> <refpurpose>Gets an exportable representation of a key into a file </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkey_export_to_file</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> @@ -18,16 +18,61 @@ <para> <function>openssl_pkey_export_to_file</function> saves an ascii-armoured (PEM encoded) rendition of <parameter>key</parameter> into the file named - by <parameter>outfilename</parameter>. The key can be optionally - protected by a <parameter>passphrase</parameter>. - <parameter>configargs</parameter> can be used to fine-tune the export - process by specifying and/or overriding options for the openssl - configuration file. See <function>openssl_csr_new</function> for more - information about <parameter>configargs</parameter>. - &return.success; + by <parameter>outfilename</parameter>. </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The key can be optionally protected by a + <parameter>passphrase</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + <parameter>configargs</parameter> can be used to fine-tune the export + process by specifying and/or overriding options for the openssl + configuration file. See <function>openssl_csr_new</function> for more + information about <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.6 phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.7 --- phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml:1.6 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.openssl-pkey-export"> <refnamediv> <refname>openssl_pkey_export</refname> <refpurpose>Gets an exportable representation of a key into a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_pkey_export</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> @@ -19,15 +19,58 @@ <function>openssl_pkey_export</function> exports <parameter>key</parameter> as a PEM encoded string and stores it into <parameter>out</parameter> (which is passed by reference). - The key is optionally protected by <parameter>passphrase</parameter>. - <parameter>configargs</parameter> can be used to fine-tune the export - process by specifying and/or overriding options for the openssl - configuration file. See <function>openssl_csr_new</function> for more - information about <parameter>configargs</parameter>. - &return.success; </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>out</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The key is optionally protected by <parameter>passphrase</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + <parameter>configargs</parameter> can be used to fine-tune the export + process by specifying and/or overriding options for the openssl + configuration file. See <function>openssl_csr_new</function> for more + information about <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.2 phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.3 --- phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml:1.2 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-free.xml Mon Jun 11 23:31:38 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="function.openssl-pkey-free"> <refnamediv> <refname>openssl_pkey_free</refname> <refpurpose>Frees a private key</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_pkey_free</methodname> <methodparam><type>resource</type><parameter>key</parameter></methodparam> @@ -16,6 +17,29 @@ <function>openssl_pkey_new</function>. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.3 phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.4 --- phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml:1.3 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-get-private.xml Mon Jun 11 23:31:38 2007 @@ -1,41 +1,64 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.4 $ --> <refentry id="function.openssl-pkey-get-private"> <refnamediv> <refname>openssl_pkey_get_private</refname> <refpurpose>Get a private key</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_get_private</methodname> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> <methodparam choice="opt"><type>string</type><parameter>passphrase</parameter></methodparam> </methodsynopsis> <para> - Returns a positive key resource identifier on success, or &false; on error. - </para> - <para> <function>openssl_get_privatekey</function> parses <parameter>key</parameter> and prepares it for use by other functions. + </para> + </refsect1> - <parameter>key</parameter> can be one of the following: - <orderedlist> - <listitem><simpara>a string having the format - <filename>file://path/to/file.pem</filename>. The named file must - contain a PEM encoded certificate/private key (it may contain both). - </simpara> - </listitem> - <listitem><simpara>A PEM formatted private key.</simpara></listitem> - </orderedlist> - + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> can be one of the following: + <orderedlist> + <listitem><simpara>a string having the format + <filename>file://path/to/file.pem</filename>. The named file must + contain a PEM encoded certificate/private key (it may contain both). + </simpara> + </listitem> + <listitem><simpara>A PEM formatted private key.</simpara></listitem> + </orderedlist> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>passphrase</parameter></term> + <listitem> + <para> + The optional parameter <parameter>passphrase</parameter> must be used + if the specified key is encrypted (protected by a passphrase). + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The optional parameter <parameter>passphrase</parameter> must be used if - the specified key is encrypted (protected by a passphrase). + Returns a positive key resource identifier on success, or &false; on error. </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.3 phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.4 --- phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml:1.3 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-get-public.xml Mon Jun 11 23:31:38 2007 @@ -1,36 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.4 $ --> <refentry id="function.openssl-pkey-get-public"> <refnamediv> <refname>openssl_pkey_get_public</refname> <refpurpose>Extract public key from certificate and prepare it for use</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_get_public</methodname> <methodparam><type>mixed</type><parameter>certificate</parameter></methodparam> </methodsynopsis> <para> - Returns a positive key resource identifier on success, or &false; on error. + <function>openssl_get_publickey</function> extracts the public key from + <parameter>certificate</parameter> and prepares it for use by other + functions. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>openssl_get_publickey</function> extracts the - public key from <parameter>certificate</parameter> and - prepares it for use by other functions. - <parameter>certificate</parameter> can be one of the following: - <orderedlist> - <listitem><simpara>an X.509 certificate resource</simpara></listitem> - <listitem><simpara>a string having the format - <filename>file://path/to/file.pem</filename>. The named file must - contain a PEM encoded certificate/private key (it may contain both). - </simpara> - </listitem> - <listitem><simpara>A PEM formatted private key.</simpara></listitem> - </orderedlist> + <variablelist> + <varlistentry> + <term><parameter>certificate</parameter></term> + <listitem> + <para> + <parameter>certificate</parameter> can be one of the following: + <orderedlist> + <listitem><simpara>an X.509 certificate resource</simpara></listitem> + <listitem><simpara>a string having the format + <filename>file://path/to/file.pem</filename>. The named file must + contain a PEM encoded certificate/private key (it may contain both). + </simpara> + </listitem> + <listitem><simpara>A PEM formatted private key.</simpara></listitem> + </orderedlist> + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a positive key resource identifier on success, or &false; on error. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml diff -u phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-pkey-new.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-pkey-new"> <refnamediv> <refname>openssl_pkey_new</refname> <refpurpose>Generates a new private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_pkey_new</methodname> <methodparam choice="opt"><type>array</type><parameter>configargs</parameter></methodparam> @@ -16,13 +16,37 @@ <function>openssl_pkey_new</function> generates a new private and public key pair. The public component of the key can be obtained using <function>openssl_pkey_get_public</function>. - You can finetune the key generation (such as specifying the number of - bits) using <parameter>configargs</parameter>. See - <function>openssl_csr_new</function> for more information about - <parameter>configargs</parameter>. </para> &reference.openssl.note-openssl-cnf; </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>configargs</parameter></term> + <listitem> + <para> + You can finetune the key generation (such as specifying the number of + bits) using <parameter>configargs</parameter>. See + <function>openssl_csr_new</function> for more information about + <parameter>configargs</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a resource identifier for the pkey on success, or &false; on + error. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-private-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-private-decrypt"> <refnamediv> <refname>openssl_private_decrypt</refname> <refpurpose>Decrypts data with private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_private_decrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,26 +19,74 @@ <function>openssl_private_decrypt</function> decrypts <parameter>data</parameter> that was previous encrypted via <function>openssl_public_encrypt</function> and stores the result into - <parameter>decrypted</parameter>. <parameter>key</parameter> must be the - private key corresponding that was used to encrypt the - data. <parameter>padding</parameter> defaults to - <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of - <constant>OPENSSL_SSLV23_PADDING</constant>, - <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <parameter>decrypted</parameter>. </para> <para> You can use this function e.g. to decrypt data which were supposed only to you. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_public_encrypt</function> and - <function>openssl_public_decrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>decrypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> must be the private key corresponding that + was used to encrypt the data. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of + <constant>OPENSSL_SSLV23_PADDING</constant>, + <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_public_encrypt</function></member> + <member><function>openssl_public_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-private-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-private-encrypt"> <refnamediv> <refname>openssl_private_encrypt</refname> <refpurpose>Encrypts data with private key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_private_encrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,22 +19,70 @@ <function>openssl_private_encrypt</function> encrypts <parameter>data</parameter> with private <parameter>key</parameter> and stores the result into <parameter>crypted</parameter>. Encrypted data can be decrypted via - <function>openssl_public_decrypt</function>. <parameter>padding</parameter> - defaults to <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <function>openssl_public_decrypt</function>. </para> <para> This function can be used e.g. to sign data (or its hash) to prove that it is not written by someone else. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_public_decrypt</function> and - <function>openssl_public_encrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>crypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_public_encrypt</function></member> + <member><function>openssl_public_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-public-decrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-public-decrypt"> <refnamediv> <refname>openssl_public_decrypt</refname> <refpurpose>Decrypts data with public key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_public_decrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,24 +19,72 @@ <function>openssl_public_decrypt</function> decrypts <parameter>data</parameter> that was previous encrypted via <function>openssl_private_encrypt</function> and stores the result into - <parameter>decrypted</parameter>. <parameter>key</parameter> must be the - public key corresponding that was used to encrypt the - data. <parameter>padding</parameter> defaults to - <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <parameter>decrypted</parameter>. </para> <para> You can use this function e.g. to check if the message was written by the owner of the private key. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_private_encrypt</function> and - <function>openssl_private_decrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>decrypted</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + <parameter>key</parameter> must be the public key corresponding that + was used to encrypt the data. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_private_encrypt</function></member> + <member><function>openssl_private_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml diff -u phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.9 phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.10 --- phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml:1.9 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-public-encrypt.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.openssl-public-encrypt"> <refnamediv> <refname>openssl_public_encrypt</refname> <refpurpose>Encrypts data with public key </refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_public_encrypt</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -19,25 +19,75 @@ <function>openssl_public_encrypt</function> encrypts <parameter>data</parameter> with public <parameter>key</parameter> and stores the result into <parameter>crypted</parameter>. Encrypted data can be decrypted via - <function>openssl_private_decrypt</function>. <parameter>padding</parameter> - defaults to <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be - one of <constant>OPENSSL_SSLV23_PADDING</constant>, - <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, - <constant>OPENSSL_NO_PADDING</constant>. - </para> - <para> - &return.success; + <function>openssl_private_decrypt</function>. </para> <para> This function can be used e.g. to encrypt message which can be then read only by owner of the private key. It can be also used to store secure data in database. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>openssl_private_decrypt</function> and - <function>openssl_private_encrypt</function>. + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>crypted</parameter></term> + <listitem> + <para> + This will hold the result of the encryption. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + The public key. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>padding</parameter></term> + <listitem> + <para> + <parameter>padding</parameter> defaults to + <constant>OPENSSL_PKCS1_PADDING</constant>, but can also be one of + <constant>OPENSSL_SSLV23_PADDING</constant>, + <constant>OPENSSL_PKCS1_OAEP_PADDING</constant>, + <constant>OPENSSL_NO_PADDING</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_private_encrypt</function></member> + <member><function>openssl_private_decrypt</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-seal.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-seal.xml diff -u phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-seal.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-seal.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-seal"> <refnamediv> <refname>openssl_seal</refname> <refpurpose>Seal (encrypt) data</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_seal</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,13 +16,6 @@ <methodparam><type>array</type><parameter>pub_key_ids</parameter></methodparam> </methodsynopsis> <para> - Returns the length of the sealed data on success, or &false; on error. - If successful the sealed data is returned in - <parameter>sealed_data</parameter>, and the envelope keys in - <parameter>env_keys</parameter>. - - </para> - <para> <function>openssl_seal</function> seals (encrypts) <parameter>data</parameter> by using RC4 with a randomly generated secret key. The key is encrypted with each of the public keys @@ -33,6 +26,56 @@ public keys). Each recipient must receive both the sealed data and the envelope key that was encrypted with the recipient's public key. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>sealed_data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>env_keys</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>pub_key_ids</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the length of the sealed data on success, or &false; on error. + If successful the sealed data is returned in + <parameter>sealed_data</parameter>, and the envelope keys in + <parameter>env_keys</parameter>. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_seal</function> example</title> @@ -64,10 +107,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_open</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_open</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-sign.xml?r1=1.10&r2=1.11&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-sign.xml diff -u phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.10 phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.11 --- phpdoc/en/reference/openssl/functions/openssl-sign.xml:1.10 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-sign.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.10 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.11 $ --> <refentry id="function.openssl-sign"> <refnamediv> <refname>openssl_sign</refname> <refpurpose>Generate signature</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_sign</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,25 +16,88 @@ <methodparam choice="opt"><type>int</type><parameter>signature_alg</parameter></methodparam> </methodsynopsis> <para> - &return.success; - If successful the signature is returned in - <parameter>signature</parameter>. - </para> - <para> <function>openssl_sign</function> computes a signature for the specified <parameter>data</parameter> by using SHA1 for hashing followed by encryption using the private key associated with <parameter>priv_key_id</parameter>. Note that the data itself is not encrypted. </para> - <note> - <para> - Optional 4th parameter <parameter>signature_alg</parameter> was added in - version 5.0.0. Its default value is - <constant>OPENSSL_ALGO_SHA1</constant>. For more information see the - list of <link linkend="openssl.signature-algos">Signature Algorithms</link>. - </para> - </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature</parameter></term> + <listitem> + <para> + If the call was successful the signature is returned in + <parameter>signature</parameter>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>priv_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature_alg</parameter></term> + <listitem> + <para> + Defaults to <constant>OPENSSL_ALGO_SHA1</constant>. For more + information see the list of <link + linkend="openssl.signature-algos">Signature Algorithms</link>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.success; + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>signature_alg</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_sign</function> example</title> @@ -59,10 +122,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_verify</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_verify</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-verify.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-verify.xml diff -u phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.8 phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.9 --- phpdoc/en/reference/openssl/functions/openssl-verify.xml:1.8 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-verify.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.9 $ --> <refentry id="function.openssl-verify"> <refnamediv> <refname>openssl_verify</refname> <refpurpose>Verify signature</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_verify</methodname> <methodparam><type>string</type><parameter>data</parameter></methodparam> @@ -16,24 +16,87 @@ <methodparam choice="opt"><type>int</type><parameter>signature_alg</parameter></methodparam> </methodsynopsis> <para> - Returns 1 if the signature is correct, 0 if it is incorrect, and - -1 on error. - </para> - <para> <function>openssl_verify</function> verifies that the <parameter>signature</parameter> is correct for the specified <parameter>data</parameter> using the public key associated with <parameter>pub_key_id</parameter>. This must be the public key corresponding to the private key used for signing. </para> - <note> - <para> - Optional 4th parameter <parameter>signature_alg</parameter> was added in - version 5.2.0. Its default value is - <constant>OPENSSL_ALGO_SHA1</constant>. For more information see the - list of <link linkend="openssl.signature-algos">Signature Algorithms</link>. - </para> - </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>data</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>pub_key_id</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>signature_alg</parameter></term> + <listitem> + <para> + Defaults to <constant>OPENSSL_ALGO_SHA1</constant>. For more + information see the list of <link + linkend="openssl.signature-algos">Signature Algorithms</link>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns 1 if the signature is correct, 0 if it is incorrect, and + -1 on error. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.0.0</entry> + <entry> + The <parameter>signature_alg</parameter> parameter was added. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> <title><function>openssl_verify</function> example</title> @@ -64,10 +127,17 @@ </programlisting> </example> </para> - <simpara> - See also <function>openssl_sign</function>. - </simpara> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>openssl_sign</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.4 phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.5 --- phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml:1.4 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-check-private-key.xml Mon Jun 11 23:31:38 2007 @@ -1,24 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.openssl-x509-check-private-key"> <refnamediv> <refname>openssl_x509_check_private_key</refname> <refpurpose>Checks if a private key corresponds to a certificate</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_check_private_key</methodname> <methodparam><type>mixed</type><parameter>cert</parameter></methodparam> <methodparam><type>mixed</type><parameter>key</parameter></methodparam> </methodsynopsis> <para> - <function>openssl_x509_check_private_key</function> returns &true; if - <parameter>key</parameter> is the private key that corresponds to - <parameter>cert</parameter>, or &false; otherwise. + Checks wether the given <parameter>key</parameter> is the private key + that corresponds to <parameter>cert</parameter>. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>cert</parameter></term> + <listitem> + <para> + The certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>key</parameter></term> + <listitem> + <para> + The private key. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if <parameter>key</parameter> is the private key that + corresponds to <parameter>cert</parameter>, or &false; otherwise. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-checkpurpose.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-checkpurpose"> <refnamediv> <refname>openssl_x509_checkpurpose</refname> <refpurpose>Verifies if a certificate can be used for a particular purpose</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>openssl_x509_checkpurpose</methodname> <methodparam><type>mixed</type><parameter>x509cert</parameter></methodparam> @@ -16,72 +16,107 @@ <methodparam choice="opt"><type>string</type><parameter>untrustedfile</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the certificate can be used for the intended purpose, - &false; if it cannot, or -1 on error. - </para> - <para> - <function>openssl_x509_checkpurpose</function> examines the certificate - specified by <parameter>x509cert</parameter> to see if it can be used for - the purpose specified by <parameter>purpose</parameter>. + <function>openssl_x509_checkpurpose</function> examines a certificate to + see if it can be used for the specified <parameter>purpose</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>cainfo</parameter> should be an array of trusted CA files/dirs - as described in <link linkend="openssl.cert.verification">Certificate - Verification</link>. It defaults to an empty array. - </para> - <para><parameter>untrustedfile</parameter>, if specified, - is the name of a PEM encoded file holding certificates that can be used to - help verify the certificate, although no trust in placed in the - certificates that come from that file. + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + The examined certificate. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>purpose</parameter></term> + <listitem> + <para> + <table> + <title><function>openssl_x509_checkpurpose</function> purposes</title> + <tgroup cols="2"> + <thead> + <row> + <entry>Constant</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry>X509_PURPOSE_SSL_CLIENT</entry> + <entry>Can the certificate be used for the client side of an SSL + connection?</entry> + </row> + <row> + <entry>X509_PURPOSE_SSL_SERVER</entry> + <entry>Can the certificate be used for the server side of an SSL + connection?</entry> + </row> + <row> + <entry>X509_PURPOSE_NS_SSL_SERVER</entry> + <entry>Can the cert be used for Netscape SSL server?</entry> + </row> + <row> + <entry>X509_PURPOSE_SMIME_SIGN</entry> + <entry>Can the cert be used to sign S/MIME email?</entry> + </row> + <row> + <entry>X509_PURPOSE_SMIME_ENCRYPT</entry> + <entry>Can the cert be used to encrypt S/MIME email?</entry> + </row> + <row> + <entry>X509_PURPOSE_CRL_SIGN</entry> + <entry>Can the cert be used to sign a certificate revocation list + (CRL)?</entry> + </row> + <row> + <entry>X509_PURPOSE_ANY</entry> + <entry>Can the cert be used for Any/All purposes?</entry> + </row> + </tbody> + </tgroup> + </table> + These options are not bitfields - you may specify one only! + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>cainfo</parameter></term> + <listitem> + <para> + <parameter>cainfo</parameter> should be an array of trusted CA files/dirs + as described in <link linkend="openssl.cert.verification">Certificate + Verification</link>. It defaults to an empty array. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>untrustedfile</parameter></term> + <listitem> + <para> + If specified, this should be the name of a PEM encoded file holding + certificates that can be used to help verify the certificate, although + no trust in placed in the certificates that come from that file. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <table> - <title><function>openssl_x509_checkpurpose</function> purposes</title> - <tgroup cols="2"> - <thead> - <row> - <entry>Constant</entry> - <entry>Description</entry> - </row> - </thead> - <tbody> - <row> - <entry>X509_PURPOSE_SSL_CLIENT</entry> - <entry>Can the certificate be used for the client side of an SSL - connection?</entry> - </row> - <row> - <entry>X509_PURPOSE_SSL_SERVER</entry> - <entry>Can the certificate be used for the server side of an SSL - connection?</entry> - </row> - <row> - <entry>X509_PURPOSE_NS_SSL_SERVER</entry> - <entry>Can the cert be used for Netscape SSL server?</entry> - </row> - <row> - <entry>X509_PURPOSE_SMIME_SIGN</entry> - <entry>Can the cert be used to sign S/MIME email?</entry> - </row> - <row> - <entry>X509_PURPOSE_SMIME_ENCRYPT</entry> - <entry>Can the cert be used to encrypt S/MIME email?</entry> - </row> - <row> - <entry>X509_PURPOSE_CRL_SIGN</entry> - <entry>Can the cert be used to sign a certificate revocation list - (CRL)?</entry> - </row> - <row> - <entry>X509_PURPOSE_ANY</entry> - <entry>Can the cert be used for Any/All purposes?</entry> - </row> - </tbody> - </tgroup> - </table> - These options are not bitfields - you may specify one only! + Returns &true; if the certificate can be used for the intended purpose, + &false; if it cannot, or -1 on error. </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-export-to-file.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-export-to-file"> <refnamediv> <refname>openssl_x509_export_to_file</refname> <refpurpose>Exports a certificate to file</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_export_to_file</methodname> <methodparam><type>mixed</type><parameter>x509</parameter></methodparam> @@ -19,11 +19,44 @@ <parameter>x509</parameter> into a file named by <parameter>outfilename</parameter> in a PEM encoded format. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>outfilename</parameter></term> + <listitem> + <para> + Path to the output file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-export.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-export.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.7 phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.8 --- phpdoc/en/reference/openssl/functions/openssl-x509-export.xml:1.7 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-export.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.19 --> +<!-- $Revision: 1.8 $ --> <refentry id="function.openssl-x509-export"> <refnamediv> <refname>openssl_x509_export</refname> <refpurpose>Exports a certificate as a string</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>openssl_x509_export</methodname> <methodparam><type>mixed</type><parameter>x509</parameter></methodparam> @@ -19,11 +19,44 @@ <parameter>x509</parameter> into a string named by <parameter>output</parameter> in a PEM encoded format. </para> - &reference.openssl.parameter-notext; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>output</parameter></term> + <listitem> + <para> + On success, this will hold the PEM. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>notext</parameter></term> + <listitem> + &reference.openssl.parameter-notext; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-free.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-free.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-x509-free.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-free.xml Mon Jun 11 23:31:38 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-x509-free"> <refnamediv> <refname>openssl_x509_free</refname> <refpurpose>Free certificate resource</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>openssl_x509_free</methodname> <methodparam><type>resource</type><parameter>x509cert</parameter></methodparam> @@ -17,6 +17,29 @@ with the specified <parameter>x509cert</parameter> resource from memory. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + &return.void; + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.6 phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.7 --- phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml:1.6 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-parse.xml Mon Jun 11 23:31:38 2007 @@ -1,14 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.openssl-x509-parse"> <refnamediv> <refname>openssl_x509_parse</refname> - <refpurpose>Parse an X509 certificate and return the information as an - array</refpurpose> + <refpurpose>Parse an X509 certificate and return the information as an array</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>openssl_x509_parse</methodname> <methodparam><type>mixed</type><parameter>x509cert</parameter></methodparam> @@ -18,16 +17,43 @@ <function>openssl_x509_parse</function> returns information about the supplied <parameter>x509cert</parameter>, including fields such as subject name, issuer name, purposes, valid from and valid to dates etc. - <parameter>shortnames</parameter> controls how the data is indexed in the - array - if <parameter>shortnames</parameter> is &true; (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. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509cert</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>shortnames</parameter></term> + <listitem> + <para> + <parameter>shortnames</parameter> controls how the data is indexed in the + array - if <parameter>shortnames</parameter> is &true; (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. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> <emphasis>The structure of the returned data is (deliberately) not yet documented, as it is still subject to change.</emphasis> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/openssl/functions/openssl-x509-read.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/openssl/functions/openssl-x509-read.xml diff -u phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.5 phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.6 --- phpdoc/en/reference/openssl/functions/openssl-x509-read.xml:1.5 Mon Jun 11 23:31:04 2007 +++ phpdoc/en/reference/openssl/functions/openssl-x509-read.xml Mon Jun 11 23:31:38 2007 @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/openssl.xml, last change in rev 1.4 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.openssl-x509-read"> <refnamediv> <refname>openssl_x509_read</refname> <refpurpose>Parse an X.509 certificate and return a resource identifier for it</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>resource</type><methodname>openssl_x509_read</methodname> <methodparam><type>mixed</type><parameter>x509certdata</parameter></methodparam> @@ -19,6 +19,29 @@ it. </para> </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>x509certdata</parameter></term> + <listitem> + <para> + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns a resource identifier on success, or &false; on failure. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file