core: Fix identify for armored detached sigs
authorAndre Heinecke <aheinecke@intevation.de>
Fri, 1 Jul 2016 08:56:57 +0000 (10:56 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Fri, 1 Jul 2016 08:56:57 +0000 (10:56 +0200)
* src/data-identify.c (basic_detection): Return signature for
signature.

--
This causes identify to return signature for both binary and
ascii armored detached signatures where previously it would
have returned signed for armored signatures and signature for
binary signatures.

GnuPG-Bug-Id: 2314

src/data-identify.c

index 1cfccd7..88a472f 100644 (file)
@@ -443,7 +443,7 @@ basic_detection (char *data, size_t datalen)
           if (!strncmp (s+11, "PGP ", 4))
             {
               if (!strncmp (s+15, "SIGNATURE", 9))
-                return GPGME_DATA_TYPE_PGP_SIGNED;
+                return GPGME_DATA_TYPE_PGP_SIGNATURE;
               if (!strncmp (s+15, "SIGNED MESSAGE", 14))
                 return GPGME_DATA_TYPE_PGP_SIGNED;
               if (!strncmp (s+15, "PUBLIC KEY BLOCK", 16))