|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58030 call to sign method results in 'no signature in result' after 6494 runs
Submitted: 2008-02-05 14:43 UTC Modified: 2015-02-11 18:48 UTC
From: jayanty4 at yahoo dot com Assigned:
Status: Wont fix Package: gnupg (PECL)
PHP Version: 5.1.6 OS: Linux 2.6.18-8.el5 #1 SMP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jayanty4 at yahoo dot com
New email:
PHP Version: OS:


 [2008-02-05 14:43 UTC] jayanty4 at yahoo dot com
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:
  $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'];
    $dsig = $gpg->sign( "test" );
    if($dsig) {
    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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-11 18:48 UTC]
-Status: Open +Status: Wont fix
 [2015-02-11 18:48 UTC]
OLD - no longer applicable
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 29 06:01:25 2020 UTC