dpf25323 2017-06-22 08:17
浏览 110

GNUPG和Crypt_GPG Crypt_GPG_KeyNotFoundException

Im trying to make work in an online apache server a project that WORKS on my local Ubuntu VM. I have installed the PEAR package pear\Crypt_GPG via composer in a laravel 5.4 project. The problem is that in the online server after I generate a key via CLI using gpg --gen-key with a passphrase. After i run the php code I get only the encrypted message and right before the decrypted message(which is not shown) it displays an error:

Crypt_GPG_KeyNotFoundException - Cannot decrypt data. No suitable private key is in the keyring. Import a suitable private key before trying to decrypt this data.

The same php code doesnt show me any error in my local VM.

My Code:

gpg_init = new Crypt_GPG(array('homedir' => '~/.gnupg', "debug"=>true));
$data = 'Hello Krisid';
$gpg->addEncryptKey('my@email.com');
//encrypt data
$encrypted = $gpg->encrypt($data);
//show it
echo "Encrypted message: 
".'<b><pre>'.$encrypted.'</pre></b>';
echo '<br><br><br>';
//select decrypt key
$gpg->addDecryptKey('my@email.com','passphrase');
//decrypt msg
$decrypted = $gpg->decrypt($encrypted);
//show it
echo "Decrypted message: 
".'<b><pre>'.$decrypted.'</pre></b>';
echo '<br><br><br>';

The log:

    Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --homedir '~/.gnupg' --version
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 560 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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-3Kby79/S.gpg-agent:24461:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '~/.gnupg' --utf8-strings --list-secret-keys 'my@mail.com'
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 321 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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED
Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-bQqbxc/S.gpg-agent:24464:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '~/.gnupg' --utf8-strings --list-public-keys 'my@mail.com'
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 541 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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED
Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-8YKlWe/S.gpg-agent:24467:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --armor --recipient '51892BACB455CD701393324727D951E5EADB65DC' --homedir '~/.gnupg' --encrypt
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 12 bytes to GPG input
Crypt_GPG DEBUG: => wrote 12 bytes
Crypt_GPG DEBUG: selecting streams
Crypt_GPG DEBUG: => got 1
Crypt_GPG DEBUG: GPG is ready for input
Crypt_GPG DEBUG: => about to write 0 bytes to GPG input
Crypt_GPG DEBUG: => broken pipe on GPG input
Crypt_GPG DEBUG: => closing pipe GPG input
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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 30 bytes
Crypt_GPG DEBUG: STATUS: BEGIN_ENCRYPTION 0 2
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 498 bytes
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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 24 bytes
Crypt_GPG DEBUG: STATUS: END_ENCRYPTION
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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED
Encrypted message:
-----BEGIN PGP MESSAGE-----
Version: GnuPG v2

hQEMAyfZUeXq22XcAQgApZX3zXXArY0tom1lKOCByBVX19hrR1w4icswHUoKg+8C
eEuaidRF+wPYwf7DotBiBd5Ade8Y9qHewPwueaj51uwfcs5H3b0teRtm2kQIP9lM
ikFChMqz1aqOHd2bMnkL7YV0V3igCcJI0FOvEFQxnuGbd9nZOzqYlhIq3GLilmHt
z0SSzGwmfSZIoXwLxgsQecV+OOcfwlinztl9f/BLYlEDi/WGJVph9LEytyxgz2kk
o2Q9OPC2d1DG9ig31aYdgUxDi05bNYg5EdVKwb+8FetdSEm/1YLLYLwXWFip0Vpv
MqhQA3m+dh8kxEI+ui9Ul6bzxPE3c5P4xiykps5AIMkiF60hbZYWBsg73UFhr4wZ
LHejagXxc7O1z0jGLOVEVAqq0A==
=RSZV
-----END PGP MESSAGE-----



Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-aePfqh/S.gpg-agent:24470:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '~/.gnupg' --utf8-strings --list-secret-keys 'my@mail.com'
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 321 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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED
Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-pTUv5j/S.gpg-agent:24473:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --with-colons --with-fingerprint --with-fingerprint --fixed-list-mode --homedir '~/.gnupg' --utf8-strings --list-public-keys 'my@mail.com'
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 65536 bytes from GPG output
Crypt_GPG DEBUG: => read 541 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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED
Crypt_GPG DEBUG: USING GPG 2.0.26 with PHP 7.0.6
Crypt_GPG DEBUG: OPENING GPG-AGENT SUBPROCESS WITH THE FOLLOWING COMMAND:
Crypt_GPG DEBUG: /usr/bin/gpg-agent --daemon --options /dev/null --csh --keep-display --no-grab --ignore-cache-for-signing --pinentry-touch-file /dev/null --disable-scdaemon --no-use-standard-socket --pinentry-program '/kunden/U563883/kunden/laravel-project/vendor/pear/crypt_gpg/Crypt/GPG/../../scripts/crypt-gpg-pinentry' --homedir '~/.gnupg'
Crypt_GPG DEBUG: GPG-AGENT-INFO: /tmp/gpg-HAlerm/S.gpg-agent:24476:1
Crypt_GPG DEBUG: CLOSING GPG-AGENT LAUNCH PROCESS
Crypt_GPG DEBUG: GPG-AGENT LAUNCH PROCESS CLOSED
Crypt_GPG DEBUG: OPENING GPG 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 --ignore-time-conflict --ignore-valid-from --homedir '~/.gnupg' --decrypt
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 498 bytes to GPG input
Crypt_GPG DEBUG: => wrote 498 bytes
Crypt_GPG DEBUG: selecting streams
Crypt_GPG DEBUG: => got 1
Crypt_GPG DEBUG: GPG is ready for input
Crypt_GPG DEBUG: => about to write 0 bytes to GPG input
Crypt_GPG DEBUG: => broken pipe on GPG input
Crypt_GPG DEBUG: => closing pipe GPG input
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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 37 bytes
Crypt_GPG DEBUG: STATUS: ENC_TO 27D951E5EADB65DC 1 0
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 65536 bytes from GPG error
Crypt_GPG DEBUG: => read 98 bytes
Crypt_GPG DEBUG: ERROR: gpg: encrypted with 2048-bit RSA key, ID EADB65DC, created 2017-04-25
Crypt_GPG DEBUG: ERROR: "my@mail.com"
Crypt_GPG DEBUG: selecting streams
Crypt_GPG DEBUG: => got 2
Crypt_GPG DEBUG: GPG error stream ready for reading
Crypt_GPG DEBUG: => about to read 65536 bytes from GPG error
Crypt_GPG DEBUG: => read 38 bytes
Crypt_GPG DEBUG: ERROR: gpg: decryption failed: No secret key
Crypt_GPG DEBUG: GPG status stream ready for reading
Crypt_GPG DEBUG: => about to read 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 113 bytes
Crypt_GPG DEBUG: STATUS: NO_SECKEY 27D951E5EADB65DC
Crypt_GPG DEBUG: STATUS: BEGIN_DECRYPTION
Crypt_GPG DEBUG: STATUS: DECRYPTION_FAILED
Crypt_GPG DEBUG: STATUS: END_DECRYPTION
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 65536 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 65536 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 65536 bytes from GPG status
Crypt_GPG DEBUG: => read 0 bytes
Crypt_GPG DEBUG: END PROCESSING
Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS
Crypt_GPG DEBUG: => subprocess returned an unexpected exit code: 2
Whoops, looks like something went wrong.
(1/1) Crypt_GPG_KeyNotFoundException
Cannot decrypt data. No suitable private key is in the keyring. Import a suitable private key before trying to decrypt this data.
in ProcessHandler.php (line 724)
at Crypt_GPG_ProcessHandler->throwException(2)
in Engine.php (line 1789)
at Crypt_GPG_Engine->_closeSubprocess()
in Engine.php (line 837)
at Crypt_GPG_Engine->run()
in GPG.php (line 1748)
at Crypt_GPG->_decrypt('-----BEGIN PGP MESSAGE-----Version: GnuPG v2hQEMAyfZUeXq22XcAQgApZX3zXXArY0tom1lKOCByBVX19hrR1w4icswHUoKg+8CeEuaidRF+wPYwf7DotBiBd5Ade8Y9qHewPwueaj51uwfcs5H3b0teRtm2kQIP9lMikFChMqz1aqOHd2bMnkL7YV0V3igCcJI0FOvEFQxnuGbd9nZOzqYlhIq3GLilmHtz0SSzGwmfSZIoXwLxgsQecV+OOcfwlinztl9f/BLYlEDi/WGJVph9LEytyxgz2kko2Q9OPC2d1DG9ig31aYdgUxDi05bNYg5EdVKwb+8FetdSEm/1YLLYLwXWFip0VpvMqhQA3m+dh8kxEI+ui9Ul6bzxPE3c5P4xiykps5AIMkiF60hbZYWBsg73UFhr4wZLHejagXxc7O1z0jGLOVEVAqq0A===RSZV-----END PGP MESSAGE-----', false, null)
in GPG.php (line 833)
at Crypt_GPG->decrypt('-----BEGIN PGP MESSAGE-----Version: GnuPG v2hQEMAyfZUeXq22XcAQgApZX3zXXArY0tom1lKOCByBVX19hrR1w4icswHUoKg+8CeEuaidRF+wPYwf7DotBiBd5Ade8Y9qHewPwueaj51uwfcs5H3b0teRtm2kQIP9lMikFChMqz1aqOHd2bMnkL7YV0V3igCcJI0FOvEFQxnuGbd9nZOzqYlhIq3GLilmHtz0SSzGwmfSZIoXwLxgsQecV+OOcfwlinztl9f/BLYlEDi/WGJVph9LEytyxgz2kko2Q9OPC2d1DG9ig31aYdgUxDi05bNYg5EdVKwb+8FetdSEm/1YLLYLwXWFip0VpvMqhQA3m+dh8kxEI+ui9Ul6bzxPE3c5P4xiykps5AIMkiF60hbZYWBsg73UFhr4wZLHejagXxc7O1z0jGLOVEVAqq0A===RSZV-----END PGP MESSAGE-----')
in EncryptController.php (line 48)
at EncryptController->index()
at call_user_func_array(array(object(EncryptController), 'index'), array())
in Controller.php (line 55)
at Controller->callAction('index', array())
in ControllerDispatcher.php (line 44)
at ControllerDispatcher->dispatch(object(Route), object(EncryptController), 'index')
in Route.php (line 203)
at Route->runController()
in Route.php (line 160)
at Route->run()
in Router.php (line 574)
at Router->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php (line 30)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in SubstituteBindings.php (line 41)
at SubstituteBindings->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in VerifyCsrfToken.php (line 65)
at VerifyCsrfToken->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in ShareErrorsFromSession.php (line 49)
at ShareErrorsFromSession->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in StartSession.php (line 64)
at StartSession->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in AddQueuedCookiesToResponse.php (line 37)
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in EncryptCookies.php (line 59)
at EncryptCookies->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php (line 102)
at Pipeline->then(object(Closure))
in Router.php (line 576)
at Router->runRouteWithinStack(object(Route), object(Request))
in Router.php (line 535)
at Router->dispatchToRoute(object(Request))
in Router.php (line 513)
at Router->dispatch(object(Request))
in Kernel.php (line 174)
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
in Pipeline.php (line 30)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in CheckForMaintenanceMode.php (line 46)
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
in Pipeline.php (line 148)
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php (line 102)
at Pipeline->then(object(Closure))
in Kernel.php (line 149)
at Kernel->sendRequestThroughRouter(object(Request))
in Kernel.php (line 116)
at Kernel->handle(object(Request))
in index.php (line 55)
Crypt_GPG DEBUG: STOPPING GPG-AGENT DAEMON
Crypt_GPG DEBUG: GPG-AGENT DAEMON STOPPED

Screenshot of the error: http://prntscr.com/fmqry9

The only difference between the servers is that in my VM there is the GNUPG v1.4 and in my online server is v2.

I tried to copy the keys inside .gnupg/ folder from my working VM to online server but didnt work. Previously this error it displayed the bad_passphrase_exception - passphrase missing (which was a bug in previous versions of the library)... and the passphrase was already specified in the code with $gpg->addDecryptKey('my@email.com','passphrase');

The vendor folder is the same as in my local VM. The Crypt_GPG is v1.6 and phpseclib is v2.0 Online server is Gentoo Linux, local VM is Ubuntu 16.4

If needed i can provide other informations

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 phython路径名过长报错 不知道什么问题
    • ¥15 深度学习中模型转换该怎么实现
    • ¥15 HLs设计手写数字识别程序编译通不过
    • ¥15 Stata外部命令安装问题求帮助!
    • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
    • ¥15 TYPCE母转母,插入认方向
    • ¥15 如何用python向钉钉机器人发送可以放大的图片?
    • ¥15 matlab(相关搜索:紧聚焦)
    • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
    • ¥15 Arduino无法同时连接多个hx711模块,如何解决?