diff options
author | Werner Koch <wk@gnupg.org> | 2022-01-28 12:09:34 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2022-01-28 12:09:34 +0100 |
commit | 34ea19aff99f473bbf076a60e1f306b677339093 (patch) | |
tree | 8c27b5632df9a29e7c001980beea704e4530e8ed /g10/dearmor.c | |
parent | gpgsm: Retire the new --ldapserver. (diff) | |
download | gnupg2-34ea19aff99f473bbf076a60e1f306b677339093.tar.xz gnupg2-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/dearmor.c')
-rw-r--r-- | g10/dearmor.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/g10/dearmor.c b/g10/dearmor.c index 92239ccfd..d364678c7 100644 --- a/g10/dearmor.c +++ b/g10/dearmor.c @@ -45,6 +45,7 @@ dearmor_file( const char *fname ) int c; afx = new_armor_context (); + afx->dearmor_mode = 1; /* prepare iobufs */ inp = iobuf_open(fname); |