|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-02-11 18:48 UTC] jimjag@php.net
-Status: Open
+Status: Wont fix
[2015-02-11 18:48 UTC] jimjag@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 08:00:02 2025 UTC |
Description: ------------ We have a server that exposes a webservice method to a command line client. The client gives the server a signature key and the server signs some data and returns that to the client. Off late we have been seeing the 'no signature in result' messages in our error logs at random times from random machines. In trying to replicate the error, I found out that the sign method throws that error after 6494 runs. Please take a look at the code snippet in the 'Reproduce code' to replicate the error Provided that you have a key with that name in your .gnupg dir, the above code should start throwing the 'no signature in result' error starting from run 6494. I figured that the work around for this problem was to call the clearsignkeys before I call the addsignkey method. Reproduce code: --------------- <?php $gpg = new gnupg(); for($i=0;$i<10000;$i++) { $name = 'my_sig_name'; $gpg->setsignmode( gnupg::SIG_MODE_DETACH ); $arr = $gpg->keyinfo( $name ); $fingerprint = $arr[0]['subkeys'][0]['fingerprint']; $gpg->addsignkey($fingerprint); $dsig = $gpg->sign( "test" ); if($dsig) { print("fine\n"); } else { print($gpg->geterror() . "\n"); } //sleep (1); } ?> Expected result: ---------------- I would expect the above snippet to print 'fine' string 10000 times. Actual result: -------------- But it prints 'no signature in result' after 6493 runs.