* tools/gpg-wks.h (WKS_RECEIVE_DRAFT2): New.
* tools/wks-receive.c: Include rfc822parse.h.
(struct receive_ctx_s): Add fields PARSER, DRAFT_VERSION_2, and
MULTIPART_MIXED_SEEN.
(decrypt_data): Add --no-options.
(verify_signature): Ditto.
(new_part): Check for Wks-Draft-Version header. Take care of text
parts.
(wks_receive): Set Parser and pass a flag value to RESULT_CB.
* tools/gpg-wks-client.c (read_confirmation_request): New.
(main) <aRead>: Call read_confirmation_request instead of
process_confirmation_request.
(command_receive_cb): Ditto. Add arg FLAGS..
(decrypt_stream_status_cb, decrypt_stream): New.
(command_send): Set header Wks-Draft-Version.
* tools/gpg-wks-server.c (struct server_ctx_s): Add field
DRAFT_VERSION_2.
(sign_stream_status_cb, sign_stream): New.
(command_receive_cb): Set draft flag.
(send_confirmation_request): Rework to implement protocol draft
version 2.
* tools/gpg-wks.h (DBG_MIME_VALUE, DBG_PARSER_VALUE): New.
(DBG_MIME, DBG_PARSER, DBG_CRYPTO): New. Use instead of a plain
opt.debug where useful.
* tools/gpg-wks-client.c (debug_flags): Add "mime" and "parser".
* tools/gpg-wks-server.c (debug_flags): Ditto.
--
If a client supporting the version 2 of the protocol is used, it will
tell this the server using a mail header. An old server will ignore
that but a recent server will use the new protocol. Next task is to
actually write draft-02.
There are still a lot of FIXMEs - take care.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tools/mime-parser.c (mime_parser_parse): Factor some code out to ...
(process_part_data): new.
((mime_parser_parse): Also call process_part_data for signed data.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tools/mime-maker.c (struct part_s): Remove field MEDIATYPE.
(release_parts): Ditto.
(dump_parts): Print a body line only if tehre is a body.
(mime_maker_add_header): Check for body or container.
(mime_maker_add_container): Remove arg MEDIATYPE. Change all callers.
(mime_maker_end_container): New.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tools/mime-parser.c (mime_parser_context_s): Add field MSG.
(parse_message_cb): Set it.
(mime_parser_rfc822parser): New.
* tools/mime-parser.h: Declare rfc822parse_t for the new prototype.
Signed-off-by: Werner Koch <wk@gnupg.org>
* g10/keyserver.c: Include mbox-util.h.
(keyserver_import_wkd): Do not use the global import options but
employ an import filter.
--
We also make sure that an mbox has been passed to keyserver_import_wkd
so it may also be called with a complete user id (which is currently
not the case).
Signed-off-by: Werner Koch <wk@gnupg.org>
* common/Makefile.am (common_sources): Drop 'call-gpg.{c,h}'.
(with_npth_sources): New variable.
(libcommonpth_a_SOURCES): Use the new variable.
Signed-off-by: Justus Winter <justus@g10code.com>
* dirmngr/Makefile.am (dirmngr_ldap_LDADD): Remove no-libgcrypt.o.
--
Thanks to Rainer Perske who located the issue.
GnuPG-bug-id: 2698
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This is a fix for the commit: 49829c29e5
* agent/pksign.c (do_encode_dsa): Fix validation of digest size.
--
Thanks to Steven Noonan <steven@uplinklabs.net> who offers patches
and a test case.
GnuPG-bug-id: 2702
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* g10/keyedit.c (keyedit_quick_adduid): Call merge_keys_and_selfsig on
KEYBLOCK before adding the user id.
* tests/openpgp/quick-key-manipulation.scm: Make sure that the key
capabilities don't change when adding a user id.
(key-data): New function.
--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 2697
* tests/openpgp/README: Add documentation about debugging and
interfacing with GnuPG.
* tests/openpgp/run-tests.scm (test::run-sync): Hand stdin to the
child so that we can use a repl in the tests.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/openpgp/conventional-mdc.scm: Use only two plaintexts when
iterating over all cipher algorithms.
Signed-off-by: Justus Winter <justus@g10code.com>
* dirmngr/crlcache.c (crl_cache_load): Open file in binary mode.
--
This fixes conversion bugs with binary CRL's on Windows.
GnuPG-bug-id: issue2448
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
--
The commands --help, --version, --dump-options are special in that
they can't be abbreciated on the command line. This is to avoid
problems with regular options with the same prefix.
Fixes-commit: 0a27d8a57c4c990fcada4278a1ce2e6fc9043e9
Signed-off-by: Werner Koch <wk@gnupg.org>
* tests/gpgscm/repl.scm (repl): Add an argument 'environment'.
(interactive-repl): Add an optional argument 'environment'.
--
With this change, we can drop
(interactive-repl (current-environment))
anywhere into the code and do some interactive debugging.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'.
* tests/gpgscm/ffi.scm (*interpreter-exit*): New variable.
(throw): New function.
(exit): New function.
--
This allows a proper cleanup of resources.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/init.scm (catch): Bind all arguments to '*error*' in
the error handler, update and fix comment.
(*error-hook*): Revert to original definition.
* tests/gpgscm/tests.scm (tr:do): Adapt accordingly.
* tests/openpgp/issue2419.scm: Likewise.
Signed-off-by: Justus Winter <justus@g10code.com>
* tests/gpgscm/ffi.c (do_get_isotime): New function.
(ffi_init): Add parameter 'scriptname', bind new function and
scriptname.
* tests/gpgscm/ffi.h (ffi_init): Update prototype.
* tests/gpgscm/main.c (main): Hand in the script name.
* tests/gpgscm/tests.scm (mkdtemp): Use current time and script name
for the names of temporary directories.
Signed-off-by: Justus Winter <justus@g10code.com>
* g10/keylist.c (list_keyblock_print): Do not depend calling
print_fingerprint on opt.keyid_format.
--
Regression-due-to: d757009a24
Debian-bug-id: 838153
Signed-off-by: Werner Koch <wk@gnupg.org>