aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-06-14 15:10:49 +0000
committerWerner Koch <[email protected]>2021-06-14 15:10:49 +0000
commitea290108e4df9f93eda79789d9cde5441d6bdd55 (patch)
tree718a83d23a0b197abc1d9231b7074ee7bf23de81
parentqt: Flush output after write for QProcess output (diff)
downloadgpgme-ea290108e4df9f93eda79789d9cde5441d6bdd55.tar.gz
gpgme-ea290108e4df9f93eda79789d9cde5441d6bdd55.zip
core: Also detect AuthEnvelopedData (AEAD for CMS)
* src/data-identify.c (basic_detection): Add OID. Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--src/data-identify.c4
-rw-r--r--src/data.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/data-identify.c b/src/data-identify.c
index eb657861..8e0295e7 100644
--- a/src/data-identify.c
+++ b/src/data-identify.c
@@ -416,8 +416,8 @@ basic_detection (char *data, size_t datalen)
}
else if (ti.length == 11)
{
- if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x10\x01\x02", 11))
- return GPGME_DATA_TYPE_CMS_OTHER; /* Auth Data. */
+ if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x10\x01\x17", 11))
+ return GPGME_DATA_TYPE_CMS_ENCRYPTED; /* AuthEnveloped Data. */
}
}
diff --git a/src/data.c b/src/data.c
index 70595907..14652938 100644
--- a/src/data.c
+++ b/src/data.c
@@ -52,7 +52,7 @@
*/
struct property_s
{
- gpgme_data_t dh; /* The data objcet or NULL if the slot is not used. */
+ gpgme_data_t dh; /* The data object or NULL if the slot is not used. */
uint64_t dserial; /* The serial number of the data object. */
struct {
unsigned int blankout : 1; /* Void the held data. */