diff options
author | Werner Koch <[email protected]> | 2022-01-28 11:09:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2022-01-28 11:09:34 +0000 |
commit | 34ea19aff99f473bbf076a60e1f306b677339093 (patch) | |
tree | 8c27b5632df9a29e7c001980beea704e4530e8ed /g10/filter.h | |
parent | gpgsm: Retire the new --ldapserver. (diff) | |
download | gnupg-34ea19aff99f473bbf076a60e1f306b677339093.tar.gz gnupg-34ea19aff99f473bbf076a60e1f306b677339093.zip |
gpg: Allow --dearmor to decode all kinds of armor files.
* g10/filter.h (armor_filter_context_t): New fields dearmor_mode and
dearmor_state.
* g10/dearmor.c (dearmor_file): Set dearmor_mode.
* g10/armor.c (is_armor_header): Magic to switch to generic dearmor
mode.
(parse_header_line): Treat non OpenPGP armor in a special way.
(check_input): Ditto.
(radix64_read): Detect non OpenPGP armor END lines.
Diffstat (limited to 'g10/filter.h')
-rw-r--r-- | g10/filter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g10/filter.h b/g10/filter.h index b2ef3828f..46342d2ad 100644 --- a/g10/filter.h +++ b/g10/filter.h @@ -35,6 +35,7 @@ typedef struct { /* these fields may be initialized */ int what; /* what kind of armor headers to write */ int only_keyblocks; /* skip all headers but ".... key block" */ + int dearmor_mode; /* dearmor all kind of stuff. */ const char *hdrlines; /* write these headerlines */ /* these fields must be initialized to zero */ @@ -49,6 +50,7 @@ typedef struct { int faked; /* we are faking a literal data packet */ int truncated; /* number of truncated lines */ int qp_detected; + int dearmor_state; /* helper for dearmor_mode. */ byte eol[3]; /* The end of line characters as a zero-terminated string. Defaults (eol[0]=='\0') to whatever the local |