svn: /pear/peardoc/trunk/en/package/encryption/crypt-gpg/ examples.xml generate-key.xml intro.xml referring-to-keys.xml
[email protected] (Michael Gauthier)
| Newsgroups | php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
gauthierm Sun, 11 Oct 2009 17:51:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289536
Log:
Clean up Crypt_GPG docbook sources.
Changed paths:
U pear/peardoc/trunk/en/package/encryption/crypt-gpg/examples.xml
U pear/peardoc/trunk/en/package/encryption/crypt-gpg/generate-key.xml
U pear/peardoc/trunk/en/package/encryption/crypt-gpg/intro.xml
U pear/peardoc/trunk/en/package/encryption/crypt-gpg/referring-to-keys.xml
svn-diffs-289536.txt
(text/x-diff, 10.1 KB)
Modified: pear/peardoc/trunk/en/package/encryption/crypt-gpg/examples.xml =================================================================== --- pear/peardoc/trunk/en/package/encryption/crypt-gpg/examples.xml 2009-10-11 17:38:40 UTC (rev 289535) +++ pear/peardoc/trunk/en/package/encryption/crypt-gpg/examples.xml 2009-10-11 17:51:23 UTC (rev 289536) @@ -9,18 +9,16 @@ <title>Examples</title> </info> - <para> - <note> - <para> - The following examples assume you have created a key following the - <link linkend="package.encryption.crypt-gpg.generate-key">instructions - for generating a key</link> that can both encrypt and sign data. The - example key has a user id of <emphasis>[email protected]</emphasis> and a - passphrase of <emphasis>test</emphasis>. All signature data is fictitious, - but is formatted like real signature data. - </para> - </note> - </para> + <note> + <para> + The following examples assume you have created a key following the + <link linkend="package.encryption.crypt-gpg.generate-key">instructions + for generating a key</link> that can both encrypt and sign data. The + example key has a user id of <emphasis>[email protected]</emphasis> and a + passphrase of <emphasis>test</emphasis>. All signature data is fictitious, + but is formatted like real signature data. + </para> + </note> <section xml:id="package.encryption.crypt-gpg.examples.signing-file"> Modified: pear/peardoc/trunk/en/package/encryption/crypt-gpg/generate-key.xml =================================================================== --- pear/peardoc/trunk/en/package/encryption/crypt-gpg/generate-key.xml 2009-10-11 17:38:40 UTC (rev 289535) +++ pear/peardoc/trunk/en/package/encryption/crypt-gpg/generate-key.xml 2009-10-11 17:51:23 UTC (rev 289536) @@ -21,41 +21,34 @@ the same as generating any other GnuPG key on a system. </para> - <para> - <important> - <para> - Though <classname>Crypt_GPG</classname> supports - <link xlink:href="&phpdocbase.crypt-gpg.method;__construct">specifying the - keyring to use</link>, <classname>Crypt_GPG</classname>, by default, uses - the keyring of the current user. If using <package>Crypt_GPG</package> - with a webserver such as Apache, the current user is the Apache user and - the key will need to be generated as the Apache user. To do this, run the - <command>gen-key</command> command as: - <informalexample> - <programlisting> - <computeroutput> + <important> + <para> + Though <classname>Crypt_GPG</classname> supports + <link xlink:href="&phpdocbase.crypt-gpg.method;__construct">specifying the + keyring to use</link>, <classname>Crypt_GPG</classname>, by default, uses + the keyring of the current user. If using <package>Crypt_GPG</package> + with a webserver such as Apache, the current user is the Apache user and + the key will need to be generated as the Apache user. To do this, run the + <command>gen-key</command> command as: + <informalexample> + <screen> <prompt>$ </prompt><command>sudo -u apache gpg --gen-key</command> - </computeroutput> - </programlisting> - </informalexample> - </para> - </important> - </para> + </screen> + </informalexample> + </para> + </important> <para> The following example walks through the process of generating a key that supports both encrypting and signing. First, run the command: - <programlisting> - <computeroutput> + <screen> <prompt>$ </prompt><command>gpg --gen-key</command> - </computeroutput> - </programlisting> + </screen> </para> <para> This will display the following copyright information and a list of available key types: - <programlisting> - <computeroutput> + <screen> gpg (GnuPG) 1.4.6; Copyright (C) 2006 Free Software Foundation, Inc. This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it @@ -66,8 +59,7 @@ (5) RSA (sign only) Your selection? <userinput>1</userinput> DSA keypair will have 1024 bits. - </computeroutput> - </programlisting> + </screen> </para> <para> @@ -75,12 +67,10 @@ generated key to both encrypt and sign data. This will generate a public-private key pair in the GPG keyring and prompt for the size of the encryption key: - <programlisting> - <computeroutput> + <screen> ELG-E keys may be between 1024 and 4096 bits long. What keysize do you want? (2048) - </computeroutput> - </programlisting> + </screen> </para> <para> @@ -88,8 +78,7 @@ how secure the encryption must be. The default value is considered safe for most applications. GnuPG then prompts for the time period over which the generated key will be valid: - <programlisting> - <computeroutput> + <screen> Please specify how long the key should be valid. 0 = key does not expire <n> = key expires in n days @@ -99,8 +88,7 @@ Key is valid for? (0) Key does not expire at all Is this correct? (y/N) <userinput>y</userinput> - </computeroutput> - </programlisting> + </screen> </para> <para> @@ -110,8 +98,7 @@ the real name of the person or organization that will use the key to sign or encrypt data. The second part is an email address and the third is a comment about the key. Both the email address and comment are optional: - <programlisting> - <computeroutput> + <screen> You need a user ID to identify your key; the software constructs the user ID from the Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) <[email protected]>" @@ -119,8 +106,7 @@ Email address: [email protected] Comment: test key Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? <userinput>o</userinput> - </computeroutput> - </programlisting> + </screen> </para> <para> @@ -129,21 +115,18 @@ Guessable passphrases will render encryption useless. For critical data such as credit card numbers, a non-dictionary word that is at least 8 characters long is recommended. - <programlisting> - <computeroutput> + <screen> You need a Passphrase to protect your secret key. Enter passphrase: Repeat passphrase: - </computeroutput> - </programlisting> + </screen> </para> <para> Following the passphrase, GnuPG will gather entropy for a period to ensure the generated key uses sutitably random numbers. When enough entropy is collected the key is generated and added to the keyring: - <programlisting> - <computeroutput> + <screen> We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number @@ -160,8 +143,7 @@ Key fingerprint = F94A F628 5725 7147 0569 F9FF E995 8292 DB15 A2C9 uid Test User (test key) <[email protected]> sub 2048g/6AD96F48 2008-08-05 - </computeroutput> - </programlisting> + </screen> </para> <para> Modified: pear/peardoc/trunk/en/package/encryption/crypt-gpg/intro.xml =================================================================== --- pear/peardoc/trunk/en/package/encryption/crypt-gpg/intro.xml 2009-10-11 17:38:40 UTC (rev 289535) +++ pear/peardoc/trunk/en/package/encryption/crypt-gpg/intro.xml 2009-10-11 17:51:23 UTC (rev 289536) @@ -36,14 +36,12 @@ <package>Crypt_GPG</package> file commands. </para> - <para> - <note> - <para> - Though GnuPG can support symmetric-key cryptography, this package is - intended only to facilitate public-key cryptography. - </para> - </note> - </para> + <note> + <para> + Though GnuPG can support symmetric-key cryptography, this package is + intended only to facilitate public-key cryptography. + </para> + </note> </section> @@ -58,22 +56,22 @@ <package>Crypt_GPG</package> is as follows: <orderedlist> <listitem> - <para>build the required command line,</para> + <simpara>build the required command line,</simpara> </listitem> <listitem> - <para>open the GnuPG subprocess with the command line,</para> + <simpara>open the GnuPG subprocess with the command line,</simpara> </listitem> <listitem> - <para> + <simpara> stream data to and from the GnuPG subprocess on various IPC pipes until the command is finished, - </para> + </simpara> </listitem> <listitem> - <para>close the GnuPG subprocess and,</para> + <simpara>close the GnuPG subprocess and,</simpara> </listitem> <listitem> - <para>check for errors.</para> + <simpara>check for errors.</simpara> </listitem> </orderedlist> </para> Modified: pear/peardoc/trunk/en/package/encryption/crypt-gpg/referring-to-keys.xml =================================================================== --- pear/peardoc/trunk/en/package/encryption/crypt-gpg/referring-to-keys.xml 2009-10-11 17:38:40 UTC (rev 289535) +++ pear/peardoc/trunk/en/package/encryption/crypt-gpg/referring-to-keys.xml 2009-10-11 17:51:23 UTC (rev 289536) @@ -34,11 +34,9 @@ methods. Alternatively, the following command may be used to list keys on a console: <informalexample> - <programlisting> - <computeroutput> + <screen> <prompt>$ </prompt><command>gpg --list-keys --with-fingerprint --with-fingerprint</command> - </computeroutput> - </programlisting> + </screen> </informalexample> <note> <para> @@ -62,21 +60,17 @@ Though rare, it is possible to have two keys with the same key id. The key id may also be obtained using the following command: <informalexample> - <programlisting> - <computeroutput> + <screen> <prompt>$ </prompt><command>gpg --list-keys --with-colons</command> - </computeroutput> - </programlisting> + </screen> </informalexample> The key id is the fifth colon-separated field. A partial key id may also be used to reference a key. The partial key id is the lower four octals of a full key id and may be obtained using the following command: <informalexample> - <programlisting> - <computeroutput> + <screen> <prompt>$ </prompt><command>gpg --list-keys</command> - </computeroutput> - </programlisting> + </screen> </informalexample> </para>