1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

gnupg: fix XML by converting para to simpara tags via script (#5134)

This commit is contained in:
Gina Peter Banyard
2026-01-18 21:19:35 +00:00
committed by GitHub
parent de2c28e23c
commit a148eb08b6
31 changed files with 144 additions and 159 deletions

View File

@@ -1,21 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<book xml:id="book.gnupg" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="book.gnupg">
<?phpdoc extension-membership="pecl" ?>
<title>GNU Privacy Guard</title>
<titleabbrev>GnuPG</titleabbrev>
<!-- {{{ preface -->
<preface xml:id="intro.gnupg">
&reftitle.intro;
<para>
This module allows you to interact with <link
xlink:href="&url.gnupg;">gnupg</link>.
</para>
<simpara>
This module allows you to interact with <link xlink:href="&url.gnupg;">gnupg</link>.
</simpara>
</preface>
<!-- }}} -->
&reference.gnupg.setup;
&reference.gnupg.constants;
&reference.gnupg.examples;
@@ -23,7 +21,6 @@
&reference.gnupg.reference;
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -44,4 +41,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<section xml:id="gnupg.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="gnupg.installation">
&reftitle.install;
<para>
<simpara>
&pecl.info;
<link xlink:href="&url.pecl.package;gnupg"/>.
</para>
</simpara>
</section>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -28,4 +27,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="gnupg.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="gnupg.examples">
&reftitle.examples;
<section xml:id="gnupg.examples-clearsign">
<title>Clearsign text</title>
<para>
<simpara>
This example will clearsign a given text.
</para>
</simpara>
<example>
<title>gnupg clearsign example (procedural)</title>
<programlisting role="php">
@@ -45,9 +45,9 @@ echo $signed;
</example>
<example xml:id="gnupg.keylistiterator">
<title>keylistiterator</title>
<para>
<simpara>
This extension also comes with an Iterator for your keyring.
</para>
</simpara>
<programlisting role="php">
<![CDATA[
<?php
@@ -58,11 +58,10 @@ foreach($iterator as $fingerprint => $userid){
}
?>
]]>
</programlisting>
</programlisting>
</example>
</section>
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -83,4 +82,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View File

@@ -34,9 +34,9 @@
<varlistentry>
<term><parameter>passphrase</parameter></term>
<listitem>
<para>
<simpara>
The pass phrase.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -44,9 +44,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -35,9 +35,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -34,9 +34,9 @@
<varlistentry>
<term><parameter>passphrase</parameter></term>
<listitem>
<para>
<simpara>
The pass phrase.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -44,9 +44,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,9 +28,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,9 +28,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,9 +28,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,9 +13,9 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>text</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Decrypts the given text with the keys, which were set with <link linkend="function.gnupg-adddecryptkey">gnupg_adddecryptkey</link> before.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -30,9 +30,9 @@
<varlistentry>
<term><parameter>text</parameter></term>
<listitem>
<para>
<simpara>
The text being decrypted.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -40,10 +40,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns the decrypted text.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -14,10 +14,10 @@
<methodparam><type>string</type><parameter>text</parameter></methodparam>
<methodparam><type>string</type><parameter role="reference">plaintext</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Decrypts and verifies a given text and returns information about the
signature.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -32,18 +32,18 @@
<varlistentry>
<term><parameter>text</parameter></term>
<listitem>
<para>
<simpara>
The text being decrypted.
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>plaintext</parameter></term>
<listitem>
<para>
<simpara>
The parameter <parameter>plaintext</parameter> gets filled with the decrypted
text.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -51,11 +51,11 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns information about the signature and
fills the <parameter>plaintext</parameter> parameter with the decrypted text.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,17 +28,17 @@
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<para>
<simpara>
The key to delete.
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>allow_secret</parameter></term>
<listitem>
<para>
<simpara>
It specifies whether to delete secret keys as well.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -46,9 +46,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,11 +13,11 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>plaintext</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Encrypts the given <parameter>plaintext</parameter> with the keys, which
were set with <link linkend="function.gnupg-addencryptkey">gnupg_addencryptkey</link> before and
returns the encrypted text.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -32,9 +32,9 @@
<varlistentry>
<term><parameter>plaintext</parameter></term>
<listitem>
<para>
<simpara>
The text being encrypted.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -42,10 +42,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns the encrypted text.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,12 +13,12 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>plaintext</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Encrypts and signs the given <parameter>plaintext</parameter> with the
keys, which were set with
<link linkend="function.gnupg-addsignkey">gnupg_addsignkey</link> and <link linkend="function.gnupg-addencryptkey">gnupg_addencryptkey</link> before and
returns the encrypted and signed text.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -33,9 +33,9 @@
<varlistentry>
<term><parameter>plaintext</parameter></term>
<listitem>
<para>
<simpara>
The text being encrypted.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -43,10 +43,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns the encrypted and signed text.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,9 +13,9 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>fingerprint</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Exports the key <parameter>fingerprint</parameter>.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -38,10 +38,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns the keydata.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,10 +28,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an array with engine info consting of <literal>protocol</literal>,
<literal>file_name</literal> and <literal>home_dir</literal>.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,9 +28,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an errortext, if an error has occurred, otherwise &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,9 +28,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an array with error info.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -28,11 +28,11 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns the currently active protocol, which can be one of
<constant>GNUPG_PROTOCOL_OpenPGP</constant> or
<constant>GNUPG_PROTOCOL_CMS</constant>.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -27,9 +27,9 @@
<varlistentry>
<term><parameter>pattern</parameter></term>
<listitem>
<para>
<simpara>
Expression to limit the list of trust items to only the ones matching the pattern.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,10 +37,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns an array of trust items.
On failure, this function returns &null;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,10 +13,10 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>keydata</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Imports the key <parameter>keydata</parameter> and returns an array with
information about the importprocess.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -31,9 +31,9 @@
<varlistentry>
<term><parameter>keydata</parameter></term>
<listitem>
<para>
<simpara>
The data key that is being imported.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -41,10 +41,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns and info-array about the importprocess.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -62,9 +62,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
A GnuPG <type>resource</type> connection used by other GnuPG functions.
</para>
</simpara>
</refsect1>
<refsect1 role="changelog">

View File

@@ -27,9 +27,9 @@
<varlistentry>
<term><parameter>pattern</parameter></term>
<listitem>
<para>
<simpara>
The pattern being checked against the keys.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,10 +37,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
Returns an array with information about all keys that matches the given
pattern or &false;, if an error has occurred.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -27,9 +27,9 @@
<varlistentry>
<term><parameter>keyid</parameter></term>
<listitem>
<para>
<simpara>
The key ID to list signatures for.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -37,10 +37,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns an array of key signatures.
On failure, this function returns &null;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,9 +13,9 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>int</type><parameter>armor</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Toggle the armored output.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -30,11 +30,11 @@
<varlistentry>
<term><parameter>armor</parameter></term>
<listitem>
<para>
<simpara>
Pass a non-zero integer-value to this function to enable armored-output
(default).
Pass 0 to disable armored output.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -42,9 +42,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,9 +13,9 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>int</type><parameter>errormode</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Sets the mode for <link linkend="ini.error-reporting">error_reporting</link>.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -30,17 +30,17 @@
<varlistentry>
<term><parameter>errormode</parameter></term>
<listitem>
<para>
<simpara>
The error mode.
</para>
<para>
</simpara>
<simpara>
<parameter>errormode</parameter> takes a constant indicating what type of
error_reporting should be used. The possible values are
<constant>GNUPG_ERROR_WARNING</constant>,
<constant>GNUPG_ERROR_EXCEPTION</constant> and
<constant>GNUPG_ERROR_SILENT</constant>.
By default <constant>GNUPG_ERROR_SILENT</constant> is used.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -48,9 +48,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.void;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -13,9 +13,9 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>int</type><parameter>signmode</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Sets the mode for signing.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -30,17 +30,17 @@
<varlistentry>
<term><parameter>sigmode</parameter></term>
<listitem>
<para>
<simpara>
The mode for signing.
</para>
<para>
</simpara>
<simpara>
<parameter>signmode</parameter> takes a constant indicating what type of
signature should be produced. The possible values are
<constant>GNUPG_SIG_MODE_NORMAL</constant>,
<constant>GNUPG_SIG_MODE_DETACH</constant> and
<constant>GNUPG_SIG_MODE_CLEAR</constant>.
By default <constant>GNUPG_SIG_MODE_CLEAR</constant> is used.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -48,9 +48,9 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
&return.success;
</para>
</simpara>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;

View File

@@ -13,12 +13,12 @@
<methodparam><type>resource</type><parameter>identifier</parameter></methodparam>
<methodparam><type>string</type><parameter>plaintext</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Signs the given <parameter>plaintext</parameter> with the keys, which were
set with <link linkend="function.gnupg-addsignkey">gnupg_addsignkey</link> before and
returns the signed text or the signature, depending on what was set with
<link linkend="function.gnupg-setsignmode">gnupg_setsignmode</link>.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -33,9 +33,9 @@
<varlistentry>
<term><parameter>plaintext</parameter></term>
<listitem>
<para>
<simpara>
The plain text being signed.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -43,10 +43,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns the signed text or the signature.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -15,10 +15,10 @@
<methodparam><type>string</type><parameter>signature</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">plaintext</parameter></methodparam>
</methodsynopsis>
<para>
<simpara>
Verifies the given <parameter>signed_text</parameter> and returns information about the
signature.
</para>
</simpara>
</refsect1>
<refsect1 role="parameters">
@@ -33,28 +33,28 @@
<varlistentry>
<term><parameter>signed_text</parameter></term>
<listitem>
<para>
<simpara>
The signed text.
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>signature</parameter></term>
<listitem>
<para>
<simpara>
The signature.
To verify a clearsigned text, set signature to &false;.
</para>
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>plaintext</parameter></term>
<listitem>
<para>
<simpara>
The plain text.
If this optional parameter is passed, it is
filled with the plain text.
</para>
</simpara>
</listitem>
</varlistentry>
</variablelist>
@@ -62,10 +62,10 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<simpara>
On success, this function returns information about the signature.
On failure, this function returns &false;.
</para>
</simpara>
</refsect1>
<refsect1 role="examples">

View File

@@ -1,38 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<reference xml:id="ref.gnupg" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<reference xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="ref.gnupg">
<title>GnuPG &Functions;</title>
<partintro>
&reftitle.notes;
<para>
<simpara>
This extension makes use of the keyring of the current user. This keyring
is normally located in ~./.gnupg/.
To specify a custom location, store the path to the keyring in the
environment variable GNUPGHOME. See <link
linkend="function.putenv">putenv</link> for more information how to do
environment variable GNUPGHOME. See <link linkend="function.putenv">putenv</link> for more information how to do
this.
</para>
<para>
</simpara>
<simpara>
Some functions require the specification of a key. This specification can
be anything that refers to a unique key (userid, key-id, fingerprint,
...).
This documentation uses the fingerprint in all examples.
</para>
</simpara>
<note>
<para>
<simpara>
As alternative to the explicitly documented functions using
<type>resource</type>s, you can also use an object-oriented style using
<classname>gnupg</classname> objects.
</para>
</simpara>
</note>
</partintro>
&reference.gnupg.entities.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -53,4 +50,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

View File

@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="gnupg.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="gnupg.setup">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="gnupg.requirements">
&reftitle.required;
<para>
<simpara>
This extension requires the <link xlink:href="&url.gpgme;">gpgme library</link>
</para>
</simpara>
</section>
<!-- }}} -->
@@ -18,7 +17,6 @@
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
@@ -39,4 +37,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->