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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC