From b841a883a2a66807aa427e65d49067584bedfbe2 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 23 Jun 2016 11:55:46 +0200 Subject: [PATCH] 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 --- agent/findkey.c | 2 +- common/Makefile.am | 6 +++--- common/{private-keys.c => name-value.c} | 9 +++++++-- common/{private-keys.h => name-value.h} | 8 ++++---- common/{t-private-keys.c => t-name-value.c} | 4 ++-- 5 files changed, 17 insertions(+), 12 deletions(-) rename common/{private-keys.c => name-value.c} (98%) rename common/{private-keys.h => name-value.h} (94%) rename common/{t-private-keys.c => t-name-value.c} (99%) diff --git a/agent/findkey.c b/agent/findkey.c index d3780b930..b2215101a 100644 --- a/agent/findkey.c +++ b/agent/findkey.c @@ -35,7 +35,7 @@ #include "agent.h" #include "i18n.h" #include "../common/ssh-utils.h" -#include "../common/private-keys.h" +#include "../common/name-value.h" #ifndef O_BINARY #define O_BINARY 0 diff --git a/common/Makefile.am b/common/Makefile.am index 884c966a3..24516894b 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -91,7 +91,7 @@ common_sources = \ call-gpg.c call-gpg.h \ exectool.c exectool.h \ server-help.c server-help.h \ - private-keys.c private-keys.h + name-value.c name-value.h if HAVE_W32_SYSTEM common_sources += w32-reg.c w32-afunix.c w32-afunix.h @@ -157,7 +157,7 @@ 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-private-keys t-ccparray + t-name-value t-ccparray if !HAVE_W32CE_SYSTEM module_tests += t-exechelp endif @@ -206,7 +206,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) +t_name_value_LDADD = $(t_common_ldadd) t_ccparray_LDADD = $(t_common_ldadd) # System specific test diff --git a/common/private-keys.c b/common/name-value.c similarity index 98% rename from common/private-keys.c rename to common/name-value.c index 4cf7d227c..601ddd43b 100644 --- a/common/private-keys.c +++ b/common/name-value.c @@ -1,4 +1,4 @@ -/* private-keys.c - Parser and writer for the extended private key format. +/* name-value.c - Parser and writer for a name-value format. * Copyright (C) 2016 g10 Code GmbH * * This file is part of GnuPG. @@ -27,16 +27,21 @@ * along with this program; if not, see . */ +/* + * This module aso provides features for the extended private key + * format of gpg-agent. + */ + #include #include #include #include #include -#include "private-keys.h" #include "mischelp.h" #include "strlist.h" #include "util.h" +#include "name-value.h" struct private_key_container { diff --git a/common/private-keys.h b/common/name-value.h similarity index 94% rename from common/private-keys.h rename to common/name-value.h index d21e94f7c..0a8694a57 100644 --- a/common/private-keys.h +++ b/common/name-value.h @@ -1,4 +1,4 @@ -/* private-keys.h - Parser and writer for the extended private key format. +/* name-value.h - Parser and writer for a name-value format. * Copyright (C) 2016 g10 Code GmbH * * This file is part of GnuPG. @@ -27,8 +27,8 @@ * along with this program; if not, see . */ -#ifndef GNUPG_COMMON_PRIVATE_KEYS_H -#define GNUPG_COMMON_PRIVATE_KEYS_H +#ifndef GNUPG_COMMON_NAME_VALUE_H +#define GNUPG_COMMON_NAME_VALUE_H struct private_key_container; typedef struct private_key_container *pkc_t; @@ -106,4 +106,4 @@ gpg_error_t pkc_parse (pkc_t *result, int *errlinep, estream_t stream); /* Write a representation of PK to STREAM. */ gpg_error_t pkc_write (pkc_t pk, estream_t stream); -#endif /* GNUPG_COMMON_PRIVATE_KEYS_H */ +#endif /* GNUPG_COMMON_NAME_VALUE_H */ diff --git a/common/t-private-keys.c b/common/t-name-value.c similarity index 99% rename from common/t-private-keys.c rename to common/t-name-value.c index 1027e70cf..d6cef3503 100644 --- a/common/t-private-keys.c +++ b/common/t-name-value.c @@ -1,4 +1,4 @@ -/* t-private-keys.c - Module test for private-keys.c +/* t-name-value.c - Module test for name-value.c * Copyright (C) 2016 g10 Code GmbH * * This file is part of GnuPG. @@ -26,7 +26,7 @@ #include #include "util.h" -#include "private-keys.h" +#include "name-value.h" static int verbose;