From:  mike@silverorange.com
Date:  29 Nov 2014 05:49:09 Hong Kong Time
Newsgroup:  news.php.net/php.pear.bugs
Subject:  

[PEAR-BUG] Bug #20453 [Opn]: crypt_gpg stops working after gnupg upgrade

NNTP-Posting-Host:  null

Edit report at https://pear.php.net/bugs/bug.php?id=20453&edit=1

 ID:               20453
 Updated by:       mike@silverorange.com
 Reported By:      mail at demuth dot mobi
 Summary:          crypt_gpg stops working after gnupg upgrade
 Status:           Open
 Type:             Bug
 Package:          Crypt_GPG
 Operating System: Archlinux
 Package Version:  1.3.2
 PHP Version:      5.6.3
 Roadmap Versions: 
 New Comment:

This might be lot of work to fix. Looks like a lot changed in GnuPG 2.1
https://gnupg.org/faq/whats-
new-in-2.1.html


Previous Comments:
------------------------------------------------------------------------

[2014-11-28 20:26:47] xelo

Description:
------------
After gnupg upgrade (2.0.26-1 -> 2.1.0-4)  digital signatures do not
work anymore.

The used keys are not protected with a pin/passphrase

Expected result:
----------------
data is signed 

Actual result:
--------------
Data is not signed, Script crashes.

LOG: 
Nov 28 20:11:41 smeik nginx[859]: 2014/11/28 20:11:41 [error] 865#0: *13
FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught 
Nov 28 20:11:41 smeik nginx[859]: 
Nov 28 20:11:41 smeik nginx[859]: 
Nov 28 20:11:41 smeik nginx[859]: 
Nov 28 20:11:41 smeik nginx[859]: 
Nov 28 20:11:41 smeik nginx[859]: 
Crypt_GPG_Exception: Unknown error signing data. Please use the 'debug' option when creating the Crypt_GPG object, and file a bug report at http://pear.php.net/bugs/report.php?package=Crypt_GPG in /usr/share/pear/Crypt/GPG.php on line 1019
Exception trace
#FunctionLocation
0Crypt_GPG->_sign('YTozOntzOjc6Imhl��, false, null, 3, true, false)/usr/share/pear/Crypt/GPG.php:1019
1Crypt_G" while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /application/ HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "localhost" From Debug Mode: Crypt_GPG DEBUG: OPENING SUBPROCESS WITH THE FOLLOWING COMMAND: Crypt_GPG DEBUG: /usr/bin/gpg --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --always-trust --homedir '/srv/http/keys/application' --version Crypt_GPG DEBUG: BEGIN PROCESSING Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 73 bytes Crypt_GPG DEBUG: ERROR: gpg: WARNING: unsafe permissions on homedir '/srv/http/keys/application' Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 3 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 592 bytes Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: END PROCESSING Crypt_GPG DEBUG: CLOSING SUBPROCESS Crypt_GPG DEBUG: OPENING SUBPROCESS WITH THE FOLLOWING COMMAND: Crypt_GPG DEBUG: /usr/bin/gpg --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --no-permission-warning --exit-on-status-write-error --trust-model always --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '/srv/http/keys/application' --list-secret-keys 'FD0E37311717109EE23745AF81507E398A2521AC' Crypt_GPG DEBUG: BEGIN PROCESSING Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 399 bytes Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 3 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: END PROCESSING Crypt_GPG DEBUG: CLOSING SUBPROCESS Crypt_GPG DEBUG: OPENING SUBPROCESS WITH THE FOLLOWING COMMAND: Crypt_GPG DEBUG: /usr/bin/gpg --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --no-permission-warning --exit-on-status-write-error --trust-model always --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '/srv/http/keys/application' --list-public-keys 'FD0E37311717109EE23745AF81507E398A2521AC' Crypt_GPG DEBUG: BEGIN PROCESSING Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 426 bytes Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 3 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: END PROCESSING Crypt_GPG DEBUG: CLOSING SUBPROCESS Crypt_GPG DEBUG: OPENING SUBPROCESS WITH THE FOLLOWING COMMAND: Crypt_GPG DEBUG: /usr/bin/gpg --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --no-permission-warning --exit-on-status-write-error --trust-model always --armor --local-user 'FD0E37311717109EE23745AF81507E398A2521AC' --homedir '/srv/http/keys/application' --detach-sign Crypt_GPG DEBUG: BEGIN PROCESSING Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG is ready for input Crypt_GPG DEBUG: => about to write 688 bytes to GPG input Crypt_GPG DEBUG: => wrote 688 bytes Crypt_GPG DEBUG: => closing GPG input pipe Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 26 bytes Crypt_GPG DEBUG: STATUS: BEGIN_SIGNING H8 Crypt_GPG DEBUG: => closing GPG input pipe Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 32 bytes Crypt_GPG DEBUG: STATUS: PINENTRY_LAUNCHED 5093 Crypt_GPG DEBUG: => closing GPG input pipe Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 82 bytes Crypt_GPG DEBUG: ERROR: gpg: signing failed: Operation cancelled Crypt_GPG DEBUG: ERROR: gpg: signing failed: Operation cancelled Crypt_GPG DEBUG: => closing GPG input pipe Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 3 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG output Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG error Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 8192 bytes from GPG status Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: => closing GPG input pipe Crypt_GPG DEBUG: END PROCESSING Crypt_GPG DEBUG: CLOSING SUBPROCESS Crypt_GPG DEBUG: => subprocess returned an unexpected exit code: 2 ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=20453&edit=1