1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Werner Koch 3ead21da80
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>
2016-06-23 13:17:25 +02:00
..
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2015-12-21 11:37:21 +01:00
2015-10-28 10:20:17 +01:00
2015-11-17 12:50:22 +01:00
2015-12-21 11:37:21 +01:00
2013-11-18 14:09:47 +01:00
2015-11-17 12:50:22 +01:00
2016-06-08 15:14:06 +02:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2016-04-29 11:04:04 +02:00
2015-03-17 09:18:23 +01:00
2016-03-02 14:27:30 +01:00
2015-11-17 12:50:22 +01:00
2015-11-17 12:50:22 +01:00
2016-05-31 15:51:18 +02:00
2015-11-17 12:50:22 +01:00
2014-11-11 15:14:31 +01:00
2015-11-17 12:50:22 +01:00
2015-02-03 09:12:45 +01:00
2014-04-17 21:09:10 +02:00
2015-10-30 12:33:40 +01:00

Common functionality used by all modules of GnuPG.