gnupg.git
3 years agog10: Fix out-of-bounds read.
Justus Winter [Tue, 5 Jul 2016 10:38:15 +0000 (12:38 +0200)]
g10: Fix out-of-bounds read.

* g10/armor.c (use_armor_filter): We need two bytes for 'is_armored'.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agowks: Add command --read to gpg-wks-client.
Werner Koch [Mon, 4 Jul 2016 09:28:58 +0000 (11:28 +0200)]
wks: Add command --read to gpg-wks-client.

* tools/gpg-wks-client.c (aRead): New.
(opts): Add command "--read".
(main): Implement that.
--

This command allows to process alread decrypted Web Key Service
messages.  It can for example be used in /etc/mailcap

--8<---------------cut here---------------start------------->8---
application/vnd.gnupg.wks; gpg-wks-client -v --read --send;\
      needsterminal; description=Web Key Service message
--8<---------------cut here---------------end--------------->8---

to allow Mutt to process confirmation requests.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotests: Add a gettime test for sizeof (time_t) > 4.
Werner Koch [Mon, 4 Jul 2016 08:00:34 +0000 (10:00 +0200)]
tests: Add a gettime test for sizeof (time_t) > 4.

* common/t-gettime.c (test_isotime2epoch): Add 4 more tests.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Avoid spurious failures on keyblocks with no or only deleted nodes.
Werner Koch [Sun, 3 Jul 2016 09:55:21 +0000 (11:55 +0200)]
gpg: Avoid spurious failures on keyblocks with no or only deleted nodes.

* g10/import.c (write_keyblock_to_output): Clear ERR on success.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agowks: Let the client only export the requested UID.
Werner Koch [Sun, 3 Jul 2016 08:27:39 +0000 (10:27 +0200)]
wks: Let the client only export the requested UID.

* tools/gpg-wks-client.c (get_key): Export only the requested uid.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotools: Call sendmail directly from the wks tools.
Werner Koch [Sat, 2 Jul 2016 22:41:30 +0000 (00:41 +0200)]
tools: Call sendmail directly from the wks tools.

* tools/send-mail.c, tools/send-mail.h: New.
* tools/wks-util.c: New.
* tools/Makefile.am (gpg_wks_server_SOURCES): Add them.
(gpg_wks_client_SOURCES): Ditto.
* tools/gpg-wks.h (opt): Add fields use_sendmail and output.
* tools/gpg-wks-client.c: Add options --send and --output.  Rename
command --send to --create.
(command_send, send_confirmation_response): Output via wks_send_mime.
* tools/gpg-wks-server.c:  Add options --send and --output.
(send_confirmation_request): Output via wks_send_mime.
(check_and_publish): Add hack for name-value bug.
--

With this code, a dedicated user on the server along with a procmail
script, it was possible to run a basic test.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotools: Add options to gpg-wks-server.
Werner Koch [Sat, 2 Jul 2016 16:59:22 +0000 (18:59 +0200)]
tools: Add options to gpg-wks-server.

* tools/gpg-wks.h (opt): Add 'default_from' and 'extra_headers'.
* tools/gpg-wks-server.c (oFrom, oHeader): New.
(parse_arguments): Set them and check args.
(get_submission_address): New.
(send_confirmation_request): Set correct From address.  Add extra
headers.
(process_new_key): Return an error code.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotools: Extend mime-maker.c:mime_maker_add_header.
Werner Koch [Sat, 2 Jul 2016 16:55:22 +0000 (18:55 +0200)]
tools: Extend mime-maker.c:mime_maker_add_header.

* tools/mime-maker.c (add_header): Check header name and allow
name-value syntax.
(mime_maker_add_header): Add mode for a syntax check.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agodoc: Describe filter expressions.
Werner Koch [Sat, 2 Jul 2016 14:18:50 +0000 (16:18 +0200)]
doc: Describe filter expressions.

* doc/gpg.texi: Remove some superfluous .E.
(FILTER EXPRESSIONS): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agoyat2m: Fix table formatting.
Werner Koch [Sat, 2 Jul 2016 14:17:25 +0000 (16:17 +0200)]
yat2m: Fix table formatting.

* doc/yat2m.c (proc_texi_cmd): Use .TQ for @itemx.  Print a .P at the
end of a level 0 table.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: New option --export-filter
Werner Koch [Fri, 1 Jul 2016 14:50:12 +0000 (16:50 +0200)]
gpg: New option --export-filter

* g10/gpg.c (oExportFilter): New.
(opts): Add --export-filter.
(main): Handle option.
* g10/export.c: Include recsel.h, init.h, and mbox-util.h.
(export_keep_uid): New global var.
(cleanup_export_globals): New.
(parse_and_set_export_filter): New.
(filter_getval): New.
(apply_keep_uid_filter): New.
(do_export_stream): Apply filter if set.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: New option --import-filter
Werner Koch [Fri, 1 Jul 2016 14:24:04 +0000 (16:24 +0200)]
gpg: New option --import-filter

* g10/gpg.c (oImportFilter): New.
(opts): Add --import-filter.
(main): Handle option.
* g10/import.c: Include recsel.h, init.h, and mbox-util.h.
(import_keep_uid): New global var.
(cleanup_import_globals): New.
(parse_and_set_import_filter): New.
(filter_getval): New.
(apply_keep_uid_filter): New.
(import_one): Apply filter if set.
--

Funny new option.  It can for example be used to export a key with
only one user id:

  gpg --no-options --import --import-options import-export \
      --import-filter keep-uid='mbox=wk@gnupg.org'         \
     < full-key.pub > key-with-one-uid.pub

More features will eventually be added.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Allow to cache the mbox in a user id struct.
Werner Koch [Fri, 1 Jul 2016 13:40:56 +0000 (15:40 +0200)]
gpg: Allow to cache the mbox in a user id struct.

* g10/packet.h (PKT_user_id): Add field 'mbox'.
* g10/free-packet.c (free_user_id): Free that.
--

This will be required by the coming import filter.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Make sure a user ID packet has always a terminating Nul in memory.
Werner Koch [Fri, 1 Jul 2016 13:18:59 +0000 (15:18 +0200)]
gpg: Make sure a user ID packet has always a terminating Nul in memory.

* g10/keygen.c (write_uid): Avoid overflow.
--

Also the actual length if the user ID is given by LEN, using NAME
diretcly is often more convenient.

3 years agocommon: Add function to select records etc.
Werner Koch [Thu, 30 Jun 2016 18:25:46 +0000 (20:25 +0200)]
common: Add function to select records etc.

* common/recsel.c, common/recsel.h: New.
* common/t-recsel.c: New.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Smart up register_mem_cleanup_func.
Werner Koch [Fri, 1 Jul 2016 12:42:18 +0000 (14:42 +0200)]
common: Smart up register_mem_cleanup_func.

* common/init.c (register_mem_cleanup_func): Avoid double registration.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Annotate semi-static allocation.
Justus Winter [Fri, 1 Jul 2016 12:09:58 +0000 (14:09 +0200)]
common: Annotate semi-static allocation.

* common/argparse.c (optfile_parse): Allow string arguments to leak.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Fri, 1 Jul 2016 12:09:01 +0000 (14:09 +0200)]
g10: Fix memory leak.

* g10/keyserver.c (parse_keyserver_uri): Free URI.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotools/gpgtar: Annotate semi-static allocation.
Justus Winter [Fri, 1 Jul 2016 11:44:32 +0000 (13:44 +0200)]
tools/gpgtar: Annotate semi-static allocation.

* tools/gpgtar.c (shell_parse_argv): Annotate argument vector as
leaked.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Fri, 1 Jul 2016 11:43:01 +0000 (13:43 +0200)]
g10: Fix memory leak.

* g10/import.c (transfer_secret_keys): Release curve from the previous
iteration.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix build with disabled kbnode cache.
Justus Winter [Fri, 1 Jul 2016 10:50:29 +0000 (12:50 +0200)]
g10: Fix build with disabled kbnode cache.

* g10/kbnode.c (release_unused_nodes): Fix build with disabled kbnode
cache.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Fri, 1 Jul 2016 10:48:57 +0000 (12:48 +0200)]
g10: Fix memory leak.

* g10/trustdb.c (tdb_get_validity_core): Fix kbnode leak.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Fri, 1 Jul 2016 09:26:54 +0000 (11:26 +0200)]
g10: Fix memory leak.

* g10/keygen.c (keygen_set_std_prefs): Fix memory leak.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agoFix trivial memory leaks in tests.
Justus Winter [Fri, 1 Jul 2016 07:47:48 +0000 (09:47 +0200)]
Fix trivial memory leaks in tests.

* dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result.
* g10/t-stutter.c (main): Free file name.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotools: Fix trivial memory leak.
Justus Winter [Thu, 30 Jun 2016 11:53:12 +0000 (13:53 +0200)]
tools: Fix trivial memory leak.

* tools/gpg-connect-agent.c (main): Fix trivial memory leak.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 16:49:15 +0000 (18:49 +0200)]
g10: Fix memory leak.

* g10/export.c (do_export_stream): Free secret parameters.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 16:45:02 +0000 (18:45 +0200)]
g10: Fix memory leak.

* g10/keygen.c (read_parameter_file): Free 'line'.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 15:55:06 +0000 (17:55 +0200)]
g10: Fix memory leak.

* g10/sign.c (mk_notation_policy_etc): Free 'mbox'.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 15:38:48 +0000 (17:38 +0200)]
common: Fix memory leak.

* g10/textfilter.c (copy_clearsig_text): Free buffer.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 15:29:19 +0000 (17:29 +0200)]
common: Fix memory leak.

* common/iobuf.c (iobuf_set_partial_body_length_mode): Only create
context if necessary.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 15:23:48 +0000 (17:23 +0200)]
common: Fix memory leak.

* common/simple-pwquery.c (agent_open): Free socket path.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix keybox-related memory leaks.
Justus Winter [Thu, 30 Jun 2016 15:09:59 +0000 (17:09 +0200)]
g10: Fix keybox-related memory leaks.

* g10/keydb.c (keydb_release): Clear keyblock cache.
(keydb_get_keyblock): Revert previous change.
* kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free
fixups after applying them.
(_keybox_release_blob): Free buffer.  Currently, the buffer has been
extracted before the keybox is released, but this is the right thing
to do here.

Fixes-commit: c57501cc
Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 13:26:06 +0000 (15:26 +0200)]
g10: Fix memory leak.

* g10/compress.c (release_context): Free buffers.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 12:00:46 +0000 (14:00 +0200)]
g10: Fix memory leak.

* g10/sign.c (write_plaintext_packet): Free packet.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leak.
Justus Winter [Thu, 30 Jun 2016 11:41:10 +0000 (13:41 +0200)]
g10: Fix memory leak.

* g10/mainproc.c (release_list): Do not exit early if list is NULL,
there are other resources that must be released.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Fix reallocating string ports.
Justus Winter [Thu, 30 Jun 2016 10:45:15 +0000 (12:45 +0200)]
gpgscm: Fix reallocating string ports.

* tests/gpgscm/scheme.c (realloc_port_string): Use memcpy because
Scheme strings may contain 0s.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Free memory backing string ports.
Justus Winter [Thu, 30 Jun 2016 10:35:27 +0000 (12:35 +0200)]
gpgscm: Free memory backing string ports.

* tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
ports.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Use the allocator from libgcrypt.
Justus Winter [Thu, 30 Jun 2016 09:46:38 +0000 (11:46 +0200)]
gpgscm: Use the allocator from libgcrypt.

* tests/gpgscm/main.c (main): Use the allocator from libgcrypt.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agow32: Fix build.
Justus Winter [Thu, 30 Jun 2016 13:28:42 +0000 (15:28 +0200)]
w32: Fix build.

* g10/keyedit.c (keyedit_quick_revuid): Fix call to
'check_trustdb_stale'.

Fixes-commit: 55d112ee
Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Implement gpg --quick-revuid
Daniel Kahn Gillmor [Thu, 16 Jun 2016 22:05:57 +0000 (18:05 -0400)]
g10: Implement gpg --quick-revuid

* g10/revoke.c (get_default_uid_revocation_reason): New.
* g10/keyedit.c (menu_revuid): Break out creation of uid revocation
into new function core_revuid.
* g10/keyedit.c (keyedit_quick_revuid): New. Selects key and
uid, invokes core_revuid.
* g10/gpg.c (main): Handle --quick-revuid argument.
* doc/gpg.texi: Document --quick-revuid.

--

This functionality is a counterpart to --quick-adduid, and will be
useful for projects that depend programmatically on gpg to revoke user
IDs (one such example is "monkeysphere-host revoke-servicename").

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
- Minor re-indentation work.
- Changed a "0 == memcmp" to "!memcmp"
- Removed tests/openpgp/quick-key-manipulation.test from the
  Makefile.  This test needs to be converted to gpgscm.
- Removed example from whats-new-in-2.1.txt because that is generated.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotools: Add gpg-wks-client and gpg-wks-server.
Werner Koch [Wed, 29 Jun 2016 10:00:22 +0000 (12:00 +0200)]
tools: Add gpg-wks-client and gpg-wks-server.

* configure.ac: Add option --enable-wks-tools
* tools/gpg-wks-client.c: New.
* tools/gpg-wks-server.c: New.
* tools/gpg-wks.h: new.
* tools/wks-receive.c: New.
* tools/call-dirmngr.c, tools/call-dirmngr.h: New.
--

Note that this is just a starting point and not a finished
implementation.  Here is how to test the system using
foo@test.gnupg.org as example.

Prepare:

  mkdir /var/lib/gnupg/wks
  chmod o-rwx /var/lib/gnupg/wks
  mkdir /var/lib/gnupg/wks/test.gnupg.org

Run the protocol:

  ./gpg-wks-client -v  --send FPR USERID >x
  ./gpg-wks-server -v --receive  <x >y
  ./gpg-wks-client --receive <y >z
  ./gpg-wks-server -v --receive  <z

You should also setup a cron job to rsync
/var/lib/gnupg/wks/test.gnupg.org/hu/* to the webserver.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agobuild: Improve GNUPG_BUILD_PROGRAM macro.
Werner Koch [Wed, 29 Jun 2016 09:39:49 +0000 (11:39 +0200)]
build: Improve GNUPG_BUILD_PROGRAM macro.

* acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotools: Add modules for MIME parsing and creating.
Werner Koch [Wed, 29 Jun 2016 09:02:36 +0000 (11:02 +0200)]
tools: Add modules for MIME parsing and creating.

* tools/mime-maker.c: New.
* tools/mime-maker.h: New.
* tools/mime-parser.c: New.
* tools/mime-parser.h: New.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpgscm: Fix memory leaks.
Justus Winter [Tue, 28 Jun 2016 16:13:40 +0000 (18:13 +0200)]
gpgscm: Fix memory leaks.

* tests/gpgscm/ffi-private.h (ffi_schemify_name): Fix prototype.
(ffi_define_function_name): Free schemified name.
(ffi_define_function): Likewise.
(ffi_define_constant): Likewise.
(ffi_define_variable_pointer): Likewise.
* tests/gpgscm/ffi.c (do_wait_processes): Free arrays.
(ffi_schemify_name): Fix type.
* tests/gpgscm/main.c (main): Free 'sc'.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Free file names.
Justus Winter [Tue, 28 Jun 2016 16:10:01 +0000 (18:10 +0200)]
gpgscm: Free file names.

* tests/gpgscm/scheme.c (scheme_load_named_file): Free file name.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Fix buffer overflow.
Justus Winter [Tue, 28 Jun 2016 16:08:01 +0000 (18:08 +0200)]
gpgscm: Fix buffer overflow.

* tests/gpgscm/scheme.c (store_string): Avoid writing past allocated
buffer.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix memory leaks.
Justus Winter [Tue, 28 Jun 2016 16:02:10 +0000 (18:02 +0200)]
g10: Fix memory leaks.

* g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'.
* g10/t-keydb-get-keyblock.c: Fix trivial memory leaks.
* g10/t-keydb.c: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Fix memory leaks.
Justus Winter [Tue, 28 Jun 2016 15:59:17 +0000 (17:59 +0200)]
common: Fix memory leaks.

* common/ccparray.c (ccparray_put): Free old array.
* common/stringhelp.c (do_make_filename): Free 'home'.
* common/t-convert.c: Fix trivial memory leaks.
* common/t-iobuf.c: Likewise.
* common/t-mbox-util.c: Likewise.
* common/t-name-value.c: Likewise.
* common/t-stringhelp.c: Likewise.
* common/t-strlist.c: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agodirmngr: add option to retrieve extra WKS info.
Werner Koch [Tue, 28 Jun 2016 13:50:38 +0000 (15:50 +0200)]
dirmngr: add option to retrieve extra WKS info.

* dirmngr/server.c (cmd_wkd_get): Add option --submission-address.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Add hack to --quick-gen-key to create Curve25519 keys.
Werner Koch [Tue, 28 Jun 2016 13:49:11 +0000 (15:49 +0200)]
gpg: Add hack to --quick-gen-key to create Curve25519 keys.

* g10/keygen.c (quick_generate_keypair): Add special algo string
"test-default".
--

Well, this is a hack to quickly create keys with the algorithms we
will eventually use as defaults.  Usage:

  gpg -v --quick-gen-key --passphrase '' --batch USERID test-default

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: New function rfctimestamp.
Werner Koch [Tue, 28 Jun 2016 13:45:53 +0000 (15:45 +0200)]
common: New function rfctimestamp.

* common/gettime.c (rfctimestamp): New.
--

It is surprisingly hard to create an RFC-2822 compliant Date value.
The problem is that strftime uses the current locale but the RFC
requires that the English names are used.  This code is pretty simply
and avoid the extra problem of figuring out the correct timezone;
instead UTC is used.  For the planned use case this is anyway better.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Add missing header file for clarity.
Werner Koch [Tue, 28 Jun 2016 13:42:58 +0000 (15:42 +0200)]
common: Add missing header file for clarity.

* common/zb32.c: Include zb32.h.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agoAdd another collection of sample keys
Werner Koch [Tue, 28 Jun 2016 07:40:35 +0000 (09:40 +0200)]
Add another collection of sample keys

--

3 years agotools/gpgtar: Fix handling of '-'.
Justus Winter [Tue, 28 Jun 2016 13:03:07 +0000 (15:03 +0200)]
tools/gpgtar: Fix handling of '-'.

* tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'.
* tools/gpgtar-list.c (gpgtar_list): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Close input stream.
Justus Winter [Tue, 28 Jun 2016 13:01:57 +0000 (15:01 +0200)]
common: Close input stream.

* common/exechelp-posix.c (gnupg_spawn_process): Also close the input
stream in the child.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Fix copying data from the spawned child.
Justus Winter [Tue, 28 Jun 2016 12:38:35 +0000 (14:38 +0200)]
common: Fix copying data from the spawned child.

Fixes intermittent gpgtar failures.

* common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'.
(gnupg_exec_tool_stream): Loop until all data is copied.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agog10: Fix --list-packets.
NIIBE Yutaka [Tue, 28 Jun 2016 06:56:48 +0000 (15:56 +0900)]
g10: Fix --list-packets.

* g10/gpg.c (main): Call set_packet_list_mode after assignment of
opt.list_packets.
* g10/mainproc.c (do_proc_packets): Don't stop processing with
--list-packets as the comment says.
* g10/options.h (list_packets): Fix the comment.
* g10/parse-packet.c: Fix the condition for opt.list_packets.

--

Debian-bug-id: 828109
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 years agobuild: Add aclocal macro from pkg-config.
Werner Koch [Sat, 25 Jun 2016 15:39:38 +0000 (17:39 +0200)]
build: Add aclocal macro from pkg-config.

* m4/pkg.m4: New.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agoyat2m: Silence lint warnings and fix a printf format bug.
Werner Koch [Sat, 25 Jun 2016 08:41:21 +0000 (10:41 +0200)]
yat2m: Silence lint warnings and fix a printf format bug.

* doc/yat2m.c (ATTR_PRINTF, ATTR_NR_PRINTF, ATTR_MALLOC): New.
(die, err, inf, xmalloc, xcalloc): New prototypes with attributes.
(get_section_buffer): Take care of !N_SECTIONS.
(proc_texi_cmd): Cast precision format arg.
(proc_texi_buffer): Do not set IN_CMD when not used afterwards.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: New import option "import-export".
Werner Koch [Fri, 24 Jun 2016 11:11:37 +0000 (13:11 +0200)]
gpg: New import option "import-export".

* g10/import.c (parse_import_options): Add option "import-export".
(write_keyblock_to_output): New.
(import_one): Implement option.
--

We are now in the import export business.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: New import option "import-show".
Werner Koch [Thu, 23 Jun 2016 17:25:53 +0000 (19:25 +0200)]
gpg: New import option "import-show".

* g10/options.h (IMPORT_SHOW): New.
* g10/import.c (parse_import_options): Add "import-show".
(import_one): Implement that.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Do not print the validity after key generation.
Werner Koch [Thu, 23 Jun 2016 17:22:13 +0000 (19:22 +0200)]
gpg: Do not print the validity after key generation.

* g10/keylist.c (struct keylist_context): Add field NO_VALIDITY.
(list_keyblock_print): Take care of it.
(list_keyblock_direct): Add arg NO_VALIDITY.
* g10/keygen.c (do_generate_keypair): Merge keyblock and print w/o
validity.
--

It will always be ultimate and by not printing it we avoid a lot of
garbage output due to the trustdb re-calculation.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Fix possible small memory leak in b64dec.c.
Werner Koch [Thu, 23 Jun 2016 15:44:55 +0000 (17:44 +0200)]
common: Fix possible small memory leak in b64dec.c.

* common/b64dec.c (b64dec_finish): Always release TITLE.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotests/openpgp: Fake the system time for the tofu test.
Justus Winter [Thu, 23 Jun 2016 15:24:23 +0000 (17:24 +0200)]
tests/openpgp: Fake the system time for the tofu test.

The keys in the tofu test are set to expire on 2016-09-17.  Fake the
system time for this test.

This commit includes changes to the old test as well, for those who
need to backport it.

* tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines.
* tests/openpgp/tofu.scm: Fake system time.
* tests/openpgp/tofu.test: Likewise.

GnuPG-bug-id: 2393
Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Handle exceptions in the transformation monad.
Justus Winter [Thu, 23 Jun 2016 15:18:13 +0000 (17:18 +0200)]
gpgscm: Handle exceptions in the transformation monad.

* tests/gpgscm/tests.scm (pipe:do): Raise errors.
(tr:spawn): Catch and return errors.
(tr:call-with-content): Likewise.
(tr:{open,write-to,pipe-do,assert-identity,assert-weak-identity}):
Adapt.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/openpgp: Improve tests.
Justus Winter [Thu, 23 Jun 2016 15:14:07 +0000 (17:14 +0200)]
tests/openpgp: Improve tests.

* tests/openpgp/multisig.scm: Simplify test.
* tests/openpgp/setup.scm (dearmor): Use pipe.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Add types for special objects.
Justus Winter [Thu, 23 Jun 2016 14:14:10 +0000 (16:14 +0200)]
gpgscm: Add types for special objects.

* tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean,
nil, eof, and the sink object.
(type_to_string): Handle new types.
(scheme_init_custom_alloc): Give special objects a type.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Fix Scheme initialization.
Justus Winter [Thu, 23 Jun 2016 12:10:00 +0000 (14:10 +0200)]
gpgscm: Fix Scheme initialization.

This potentially causes a crash if the garbage collector marks an eof
object.

* tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
'EOF_OBJ'.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Fix manual.
Justus Winter [Thu, 23 Jun 2016 11:18:25 +0000 (13:18 +0200)]
gpgscm: Fix manual.

--
Signed-off-by: Justus Winter <justus@g10code.com>
3 years agocommon: Add dedicated private key functions to name-value.c.
Werner Koch [Thu, 23 Jun 2016 11:17:25 +0000 (13:17 +0200)]
common: Add dedicated private key functions to name-value.c.

* common/name-value.c (struct name_value_container): Add field
'private_key_mode'.
(my_error): New.  Use instead of gpg_error.
(nvc_new_private_key): New.
(nve_release): Add arg 'private_key_mode'.
(nvc_release): Call nve_release with private_key_mode flag.
(nvc_delete): Ditto.
(_nvc_add): Do no special case "Key:" in non-private_key_mode.
(nvc_get_private_key): Return error in non-private_key_mode.
(nvc_set_private_key): Ditto.
(nvc_parse):  Factor all code out to ...
(do_nvc_parse): new.  Add arg 'for_private_key'.
(nvc_parse_private_key): New.
* agent/findkey.c (write_extended_private_key): Replace nvc_parse by
nvc_parse_private_key.
(read_key_file): Ditto.

* common/t-name-value.c (private_key_mode): New variable.
(my_nvc_new): New.  Replace all callers.
(test_key_extraction): Take mode in account.
(run_tests): Ditto.
(run_modification_tests): Ditto.
(parse): Ditto.
(main): Add option --parse and rename --parse to --parse-key.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Rename external symbols in name-value.c.
Werner Koch [Thu, 23 Jun 2016 10:12:50 +0000 (12:12 +0200)]
common: Rename external symbols in name-value.c.

* common/name-value.c, common/name-value.h: Rename symbol prefixes
from "pkc_" to "nvc_" and from "pke_" to "nve_".  Change all callers.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Rename private-keys.c to name-value.c
Werner Koch [Thu, 23 Jun 2016 09:55:46 +0000 (11:55 +0200)]
common: Rename private-keys.c to name-value.c

* common/private-keys.c: Rename to name-value.c.
* common/private-keys.h: Rename to name-value.h.  Chage all users.
* common/t-private-keys.c: Rename to t-name-value.c.
* common/Makefile.am: Adjust accordingly.
--

The module is cool enough to be used for other purposes as well.  Thus
we better change the name.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Change license of b64dec.c and b64enc.c to LGPLv2.1+
Werner Koch [Thu, 23 Jun 2016 07:21:45 +0000 (09:21 +0200)]
common: Change license of b64dec.c and b64enc.c to LGPLv2.1+

--

The code as solely been written by employees of g10 Code.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agocommon: Add PGP armor decoding to b64dec.
Werner Koch [Thu, 23 Jun 2016 07:20:24 +0000 (09:20 +0200)]
common: Add PGP armor decoding to b64dec.

* common/b64dec.c (decoder_states): Add new states.
(b64dec_proc): Handle PGP armored format.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotests: Add four more sample messages for the two new keys to the repo.
Werner Koch [Wed, 22 Jun 2016 16:40:35 +0000 (18:40 +0200)]
tests: Add four more sample messages for the two new keys to the repo.

--

These are uncompressed signed messages

3 years agog10: Fix regression of card-edit/fetch.
NIIBE Yutaka [Thu, 23 Jun 2016 03:12:43 +0000 (12:12 +0900)]
g10: Fix regression of card-edit/fetch.

* g10/card-util.c (fetch_url): Call keyserver_fetch instead of
keyserver_import_fprint.

--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 years agotests: Add a set of sample messages for the two new keys to the repo.
Werner Koch [Wed, 22 Jun 2016 09:21:50 +0000 (11:21 +0200)]
tests: Add a set of sample messages for the two new keys to the repo.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotests: Add two more sample keys for OpenPGP.
Werner Koch [Wed, 22 Jun 2016 09:20:35 +0000 (11:20 +0200)]
tests: Add two more sample keys for OpenPGP.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agotests/migrations: Convert to Scheme and re-enable.
Justus Winter [Tue, 21 Jun 2016 16:10:18 +0000 (18:10 +0200)]
tests/migrations: Convert to Scheme and re-enable.

* configure.ac: Re-enable.
* tests/Makefile.am: Likewise.
* tests/migrations/Makefile.am (TESTS): Use Scheme tests.
* tests/migrations/common.scm: New file.
* tests/migrations/extended-private-key-format.scm: Likewise.
* tests/migrations/from-classic.scm: Likewise.
* tests/migrations/extended-private-key-format.test: Drop file.
* tests/migrations/from-classic.test: Drop file.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Add more file handling functions.
Justus Winter [Tue, 21 Jun 2016 16:12:03 +0000 (18:12 +0200)]
gpgscm: Add more file handling functions.

* tests/gpgscm/ffi.c (do_glob): New function.
(ffi_init): Define new function.
* tests/gpgscm/tests.scm (basename-suffix): New function.x

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/openpgp: Port the remaining tests to Scheme.
Justus Winter [Tue, 21 Jun 2016 11:20:29 +0000 (13:20 +0200)]
tests/openpgp: Port the remaining tests to Scheme.

* tests/openpgp/Makefile.am (TESTS): Add new tests.
* tests/openpgp/defs.scm (gpg-with-colons): New function.
(get-config): Use new function.
* tests/openpgp/export.scm: New file.
* tests/openpgp/tofu.scm: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Improve test framework.
Justus Winter [Tue, 21 Jun 2016 10:21:10 +0000 (12:21 +0200)]
gpgscm: Improve test framework.

* tests/gpgscm/lib.scm (echo): Move...
* tests/gpgscm/tests.scm (echo): ... here.
(info, error, skip): And use echo here.
(file-exists?): New function.
(tr:spawn): Check that source exists and if the sink has been created.
(tr:call-with-content): Hand in optional arguments.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Use native string searching functions.
Justus Winter [Tue, 21 Jun 2016 10:12:56 +0000 (12:12 +0200)]
gpgscm: Use native string searching functions.

* tests/gpgscm/ffi-private.h: Handle character arguments.
* tests/gpgscm/ffi.c (do_string_index): New function.
(do_string_rindex): Likewise.
(do_string_contains): Likewise.
(ffi_init): Define new functions.
* tests/gpgscm/ffi.scm (ffi-define): New macro.
* tests/gpgscm/lib.scm (string-index): Use native function,
demonstrate behavior.
(string-rindex): Likewise.
(string-contains?): Likewise.
Demonstrate behavior of various other functions.
(read-all): Rework so that it can handle large files.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Improve error reporting.
Justus Winter [Tue, 21 Jun 2016 14:09:49 +0000 (16:09 +0200)]
gpgscm: Improve error reporting.

* tests/gpgscm/scheme.c (type_to_string): New function.
(Eval_Cycle): Include actual type in error message.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agogpgscm: Make memory allocation failures fatal.
Justus Winter [Tue, 21 Jun 2016 10:19:07 +0000 (12:19 +0200)]
gpgscm: Make memory allocation failures fatal.

* tests/gpgscm/scheme.c (Eval_Cycle): Exit if we run out of memory.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agosm: Do not install cacert and other root certificates.
Werner Koch [Tue, 21 Jun 2016 07:47:49 +0000 (09:47 +0200)]
sm: Do not install cacert and other root certificates.

* doc/Makefile.am (dist_pkgdata_DATA): Move qualified.txt and
com-certs.pem to ...
(EXTRA_DIST): here.
--

With Let's Encrypt there is no more need to push CA Cert.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: Add experimental support for an issuer fpr.
Werner Koch [Mon, 20 Jun 2016 21:58:16 +0000 (23:58 +0200)]
gpg: Add experimental support for an issuer fpr.

* common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New.
* g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and
insert the issuer fpr if needed.
* g10/sign.c (write_signature_packets): Pass signing key.
(make_keysig_packet): Ditto.
(update_keysig_packet): Ditto.
* g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr.
(parse_one_sig_subpkt): Detect issuer fpr.
(can_handle_critical): Add issuer fpr.
* g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint.
* g10/gpgv.c (keyserver_import_fprint): New stub.
* g10/test-stubs.c (keyserver_import_fprint): New stub.
--

This support is enabled with the --rfc4880bis option and intended to
test to recently proposed issuer fpr.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpg: New option --rfc4880bis.
Werner Koch [Mon, 20 Jun 2016 20:19:23 +0000 (22:19 +0200)]
gpg: New option --rfc4880bis.

* g10/options.h (struct opt): Add field flags.rfc4880bis.
* g10/gpg.c (oRFC4880bis): new.
(opts): add --rfc4880bis.
(main): Implement that and print a warning.
--

This is option enables experimental features which may be dropped or
changed with the next release.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agoscd: Reset nonnull_nad to zero for VENDOR_GEMPC.
Niibe Yutaka [Sun, 19 Jun 2016 02:24:50 +0000 (11:24 +0900)]
scd: Reset nonnull_nad to zero for VENDOR_GEMPC.

* (parse_ccid_descriptor): nonnull_nad = 0 for all GEMPC device.

--

We can't use the driver for 08E6:3438, while it works well under PC/SC
service.  I found that the library of ccid always uses the node
address = ZERO for all transactions.  So, we extend the same handling
for not only GEMPC_CT30, but also for all its devices.

Debian-bug-id: 814584
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
3 years agotests: Make make distcheck work again.
Werner Koch [Fri, 17 Jun 2016 19:16:37 +0000 (21:16 +0200)]
tests: Make make distcheck work again.

* Makefile.am (tests): Remove test code which would led to doubling
calls to for e.g. "make distclean".
* tests/Makefile.am: Typo fixes.
* tests/gpgscm/Makefile.am (EXTRA_DIST): Fix name of License file.
Add repl.scm.
(check): Replace by check-local because check is a standard automake
target.
* tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Replace gmake0sim by
automake generated macro.
(EXTRA_DIST): Add defs.scm

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agogpgscm: Silence compiler warnings.
Werner Koch [Fri, 17 Jun 2016 17:32:49 +0000 (19:32 +0200)]
gpgscm: Silence compiler warnings.

* tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N.
(fill_vector): Ditto.
(mark): Rename var NUM to N.
(set_slot_in_env): Mark SC as unused.
(is_any): Mark P as unused.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agoAdd license notices for TinySCHEME.
Werner Koch [Fri, 17 Jun 2016 16:53:14 +0000 (18:53 +0200)]
Add license notices for TinySCHEME.

* tests/gpgscm/COPYING: Rename to ...
* tests/gpgscm/LICENSE.TinySCHEME: this.
* AUTHORS: Add a note about TinySCHEME.
* build-aux/speedo/w32/pkg-copyright.txt: Add TinySCHEME notice.
--

I renamed the file with the license terms to avoid confusion with the
standard name for the GPL.

Signed-off-by: Werner Koch <wk@gnupg.org>
3 years agobuild: Ignore two build image files in doc/
Werner Koch [Fri, 17 Jun 2016 06:56:13 +0000 (08:56 +0200)]
build: Ignore two build image files in doc/

--

Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
3 years agotests/openpgp: Reimplement tests in Scheme.
Justus Winter [Thu, 7 Jan 2016 16:01:45 +0000 (17:01 +0100)]
tests/openpgp: Reimplement tests in Scheme.

* Makefile.am: Build the test infrastructure on Windows.
* tests/openpgp/Makefile.am (required_pgms): Add gpgscm.
(TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found.
(TESTS): Replace tests with the new Scheme implementations.
* tests/openpgp/4gb-packet.scm: New file.
* tests/openpgp/README: Likewise.
* tests/openpgp/armdetach.scm: Likewise.
* tests/openpgp/armdetachm.scm: Likewise.
* tests/openpgp/armencrypt.scm: Likewise.
* tests/openpgp/armencryptp.scm: Likewise.
* tests/openpgp/armor.scm: Likewise.
* tests/openpgp/armsignencrypt.scm: Likewise.
* tests/openpgp/armsigs.scm: Likewise.
* tests/openpgp/clearsig.scm: Likewise.
* tests/openpgp/conventional-mdc.scm: Likewise.
* tests/openpgp/conventional.scm: Likewise.
* tests/openpgp/decrypt-dsa.scm: Likewise.
* tests/openpgp/decrypt.scm: Likewise.
* tests/openpgp/default-key.scm: Likewise.
* tests/openpgp/defs.scm: Likewise.
* tests/openpgp/detach.scm: Likewise.
* tests/openpgp/detachm.scm: Likewise.
* tests/openpgp/ecc.scm: Likewise.
* tests/openpgp/encrypt-dsa.scm: Likewise.
* tests/openpgp/encrypt.scm: Likewise.
* tests/openpgp/encryptp.scm: Likewise.
* tests/openpgp/finish.scm: Likewise.
* tests/openpgp/genkey1024.scm: Likewise.
* tests/openpgp/gpgtar.scm: Likewise.
* tests/openpgp/import.scm: Likewise.
* tests/openpgp/mds.scm: Likewise.
* tests/openpgp/multisig.scm: Likewise.
* tests/openpgp/run-tests.scm: Likewise.
* tests/openpgp/seat.scm: Likewise.
* tests/openpgp/setup.scm: Likewise.
* tests/openpgp/signencrypt-dsa.scm: Likewise.
* tests/openpgp/signencrypt.scm: Likewise.
* tests/openpgp/sigs-dsa.scm: Likewise.
* tests/openpgp/sigs.scm: Likewise.
* tests/openpgp/use-exact-key.scm: Likewise.
* tests/openpgp/verify.scm: Likewise.
* tests/openpgp/version.scm: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/gpgscm: Add a TinySCHEME-based test driver.
Justus Winter [Wed, 6 Jan 2016 10:55:25 +0000 (11:55 +0100)]
tests/gpgscm: Add a TinySCHEME-based test driver.

* configure.ac: Add new component.
* tests/Makefile.am: Likewise.
* tests/gpgscm/Makefile.am: New file.
* tests/gpgscm/ffi-private.h: Likewise.
* tests/gpgscm/ffi.c: Likewise.
* tests/gpgscm/ffi.h: Likewise.
* tests/gpgscm/ffi.scm: Likewise.
* tests/gpgscm/lib.scm: Likewise.
* tests/gpgscm/main.c: Likewise.
* tests/gpgscm/private.h: Likewise.
* tests/gpgscm/repl.scm: Likewise.
* tests/gpgscm/scheme-config.h: Likewise.
* tests/gpgscm/t-child.c: Likewise.
* tests/gpgscm/t-child.scm: Likewise.
* tests/gpgscm/tests.scm: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/gpgscm: Foreign objects support for TinySCHEME.
Justus Winter [Thu, 31 Mar 2016 11:49:56 +0000 (13:49 +0200)]
tests/gpgscm: Foreign objects support for TinySCHEME.

* tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'.
(is_foreign_object): New prototype.
(get_foreign_object_{vtable,data}): Likewise.
* tests/gpgscm/scheme.c (enum scheme_types): New type.
(is_foreign_object): New function.
(get_foreign_object_{vtable,data}): Likewise.
(mk_foreign_object): Likewise.
(finalize_cell): Free foreign objects.
(atom2str): Pretty-print foreign objects.
(vtbl): Add new functions.
* tests/gpgscm/scheme.h (struct foreign_object_vtable): New type.
(mk_foreign_object): New prototype.
(struct scheme_interface): Add new functions.

Patch from Thomas Munro,
https://sourceforge.net/p/tinyscheme/patches/13/

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/gpgscm: Dynamically allocate string buffer.
Justus Winter [Thu, 31 Mar 2016 11:33:03 +0000 (13:33 +0200)]
tests/gpgscm: Dynamically allocate string buffer.

* tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic.
* tests/gpgscm/scheme.c (expand_strbuff): New function.
(putcharacter): Adapt length test.
(readstrexp): Expand buffer if necessary.
(scheme_init_custom_alloc): Initialize buffer.
(scheme_deinit): Free buffer.

Patch from Thomas Munro,
https://sourceforge.net/p/tinyscheme/patches/11/

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/gpgscm: Make exception value available.
Justus Winter [Mon, 22 Feb 2016 15:36:12 +0000 (16:36 +0100)]
tests/gpgscm: Make exception value available.

* tests/gpgscm/init.scm (throw): Hand exception value to the handler.
(catch): And bind it to *error*.

3 years agotests/gpgscm: Add package macro.
Justus Winter [Thu, 28 Jan 2016 17:19:07 +0000 (18:19 +0100)]
tests/gpgscm: Add package macro.

* tests/gpgscm/init.scm: Add package macro from manual.

Signed-off-by: Justus Winter <justus@g10code.com>
3 years agotests/gpgscm: Expose function to open streams as Scheme ports.
Justus Winter [Fri, 22 Jan 2016 10:15:20 +0000 (11:15 +0100)]
tests/gpgscm: Expose function to open streams as Scheme ports.

* tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
* tests/gpgscm/scheme.h (struct scheme_interface): New field
'mk_port_from_file'.

Signed-off-by: Justus Winter <justus@g10code.com>