mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-14 21:47:19 +02:00
common: Add support for the new extended private key format.
* agent/findkey.c (write_extended_private_key): New function. (agent_write_private_key): Detect if an existing file is in extended format and update the key within if it is. (read_key_file): Handle the new format. * agent/keyformat.txt: Document the new format. * common/Makefile.am: Add the new files. * common/private-keys.c: New file. * common/private-keys.h: Likewise. * common/t-private-keys.c: Likewise. * common/util.h (alphap, alnump): New macros. * tests/migrations: Add test demonstrating that we can cope with the new format. -- GnuPG 2.3+ will use a new format to store private keys that is both more flexible and easier to read and edit by human beings. The new format stores name,value-pairs using the common mail and http header convention. This patch adds the parser and support code and prepares GnuPG 2.1 for the new format. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
c6d1f2f08c
commit
12af2630cf
14 changed files with 1831 additions and 13 deletions
|
@ -89,7 +89,8 @@ common_sources = \
|
|||
strlist.c strlist.h \
|
||||
call-gpg.c call-gpg.h \
|
||||
exectool.c exectool.h \
|
||||
server-help.c server-help.h
|
||||
server-help.c server-help.h \
|
||||
private-keys.c private-keys.h
|
||||
|
||||
if HAVE_W32_SYSTEM
|
||||
common_sources += w32-reg.c w32-afunix.c w32-afunix.h
|
||||
|
@ -154,7 +155,8 @@ endif
|
|||
module_tests = t-stringhelp t-timestuff \
|
||||
t-convert t-percent t-gettime t-sysutils t-sexputil \
|
||||
t-session-env t-openpgp-oid t-ssh-utils \
|
||||
t-mapstrings t-zb32 t-mbox-util t-iobuf t-strlist
|
||||
t-mapstrings t-zb32 t-mbox-util t-iobuf t-strlist \
|
||||
t-private-keys
|
||||
if !HAVE_W32CE_SYSTEM
|
||||
module_tests += t-exechelp
|
||||
endif
|
||||
|
@ -203,6 +205,7 @@ t_zb32_LDADD = $(t_common_ldadd)
|
|||
t_mbox_util_LDADD = $(t_common_ldadd)
|
||||
t_iobuf_LDADD = $(t_common_ldadd)
|
||||
t_strlist_LDADD = $(t_common_ldadd)
|
||||
t_private_keys_LDADD = $(t_common_ldadd)
|
||||
|
||||
# System specific test
|
||||
if HAVE_W32_SYSTEM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue