php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57934 SIG_MODE_DETACH produces clearsigned data
Submitted: 2007-11-28 23:33 UTC Modified: 2007-11-28 23:35 UTC
From: mike at silverorange dot com Assigned:
Status: Not a bug Package: gnupg (PECL)
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
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:
5 + 7 = ?
Subscribe to this entry?

 
 [2007-11-28 23:33 UTC] mike at silverorange dot com
Description:
------------
SIG_MODE_DETACH produces clearsigned data. It should produce a detached signature.

Reproduce code:
---------------
$gnupg = new gnupg();
$gnupg->setarmor(true);
$gnupg->setsignmode(gnupg::SIG_MODE_DETACH);
$signature = $gnupg->sign('Hello, World!');
echo $signature;

Expected result:
----------------
detached, ascii-armored signature data

Actual result:
--------------
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, World!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHTj99U9QP/mzu0TcRAoCKAKCDf97/zd8NHNlCv8AxXsW7PBSliQCdF27t
leOpD4w3sRd9QQkTza0akSU=
=xPjd
-----END PGP SIGNATURE-----

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-28 23:35 UTC] mike at silverorange dot com
I was passing in the wrong constant in my test script.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 09:01:27 2019 UTC