Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.9

Request #17006 Add support for --textmode option of GnuPG
Submitted: 2010-01-18 02:53 UTC
From: gauthierm Assigned: gauthierm
Status: Closed Package: Crypt_GPG (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 + 41 = ?

 
 [2010-01-18 02:53 UTC] gauthierm (Michael Gauthier)
Description: ------------ This will make it easier to implement pgp-signed mail. Hi Michael! > Does the gpg --clearsign --armor option do the same thing as --textmode? No. --clearsign will return data enclosed in a GPG frame. What is needed for signed MIME mail is a detached signature. I can send you an example if you like. > If so, Crypt_GPG already supports such signatures as: > > $gpg = new Crypt_GPG(); > $gpg->addSignKey('foo@example.com', 'passphrase'); > $gpg->sign('Foo bar', Crypt_GPG::SIGN_MODE_CLEAR, true); > > If --textmode is different, does it make sense to allow it for other > methods that return PGP data as well (encryption and key export)? From the documentation the option seems to make sense when signing data that could be text and not only binary data - such as MIME containers, mail and stuff. Here is what gpg(1) says about this option: -t, --textmode --no-textmode Treat input files as text and store them in the OpenPGP canoni- cal text form with standard "CRLF" line endings. This also sets the necessary flags to inform the recipient that the encrypted or signed data is text and may need its line endings converted back to whatever the local system uses. This option is useful when communicating between two platforms that have different line ending conventions (UNIX-like to Mac, Mac to Windows, etc). --no-textmode disables this option, and is the default. If -t (but not --textmode) is used together with armoring and signing, this enables clearsigned messages. This kludge is needed for command-line compatibility with command-line versions of PGP; normally you would use --sign or --clearsign to select the type of the signature. It doesn't seem to be useful for exporting keys. It could be useful for encryption. > In SVN, you may notice there are also new methods for encrypt+sign and > decrypt+verify. I'm still working on unit tests for those, but I'd like > to do a 1.1.x release soon. That sounds good. Regards, Joey

Comments

 [2010-01-23 14:49 UTC] joeyschulze (Joey Schulze)
 [2010-01-23 14:53 UTC] joeyschulze (Joey Schulze)
This patch (and feature request) allows to create digitally signed mails. For mails --textmode has to be added to the commandline to cope with CR/CRLF conversions. The attached patch is by Michael Gauthier and me.
 [2010-01-26 02:48 UTC] gauthierm (Michael Gauthier)
Thanks for the patch. The patch is now applied in SVN.
 [2010-02-27 07:12 UTC] gauthierm (Michael Gauthier)
-Assigned To: +Assigned To: gauthierm
 [2010-03-01 10:57 UTC] gauthierm (Michael Gauthier)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.