diff options
| author | Werner Koch <[email protected]> | 2018-05-31 23:01:08 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2018-05-31 23:01:08 +0000 | 
| commit | dd19cabe81b7bf4177ea2ca741f6eb6cd1cab25e (patch) | |
| tree | f984b33f451be62f97739132384d322e5056674b /src | |
| parent | core: Remove cruft from the engine-gpg code. (diff) | |
| download | gpgme-dd19cabe81b7bf4177ea2ca741f6eb6cd1cab25e.tar.gz gpgme-dd19cabe81b7bf4177ea2ca741f6eb6cd1cab25e.zip  | |
core: New decryption result flag 'legacy_cipher_nomdc'.
* src/gpgme.h.in (_gpgme_op_decrypt_result): Add flag
legacy_cipher_nomdc.
* src/decrypt.c (parse_status_error): Set this flag.
* tests/run-decrypt.c (print_result): print it.
(main): Print the result even on error.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
| -rw-r--r-- | src/decrypt.c | 7 | ||||
| -rw-r--r-- | src/gpgme.h.in | 6 | 
2 files changed, 11 insertions, 2 deletions
diff --git a/src/decrypt.c b/src/decrypt.c index 7dbc6fd6..f2278d8d 100644 --- a/src/decrypt.c +++ b/src/decrypt.c @@ -57,7 +57,7 @@ typedef struct    int any_no_seckey;    /* If the engine emits a DECRYPTION_INFO status and that does not -   * indicate that an integrity proetction mode is active, this flag +   * indicate that an integrity protection mode is active, this flag     * is set.  */    int not_integrity_protected; @@ -214,6 +214,11 @@ parse_status_error (char *args, op_data_t opd)            break;          }      } +  else if (!strcmp (field[0], "nomdc_with_legacy_cipher")) +    { +      opd->result.legacy_cipher_nomdc = 1; +      opd->not_integrity_protected = 1; +    }    free (args2); diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 49fafb90..5279f6a2 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -1365,8 +1365,12 @@ struct _gpgme_op_decrypt_result    /* The message claims that the content is a MIME object.  */    unsigned int is_mime : 1; +  /* The message was made by a legacy algorithm without any integrity +   * protection.  This might be an old but legitimate message. */ +  unsigned int legacy_cipher_nomdc : 1; +    /* Internal to GPGME, do not use.  */ -  int _unused : 29; +  int _unused : 28;    gpgme_recipient_t recipients;  | 
