[Pkg-gnupg-commit] [gnupg2] 10/118: common: Rename an odd named function.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 15 18:24:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch encoding-and-speling
in repository gnupg2.
commit 74a082bc10960b2d65d4d1e31152f988a40a2225
Author: Werner Koch <wk at gnupg.org>
Date: Thu Aug 25 15:16:32 2016 +0200
common: Rename an odd named function.
* common/openpgp-oid.c (oid_crv25519): Rename to oid_cv25519.
(openpgp_oid_is_crv25519): Rename to openpgp_oid_is_cv25519. Change
callers.
--
We use "cv25519" everywhere else and thus the test function should not
have a surprising name.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
common/openpgp-oid.c | 8 ++++----
common/util.h | 2 +-
g10/keyid.c | 2 +-
g10/pkglue.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c
index 7c93547..af3cbbe 100644
--- a/common/openpgp-oid.c
+++ b/common/openpgp-oid.c
@@ -68,7 +68,7 @@ static const char oid_ed25519[] =
{ 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01 };
/* The OID for Curve25519 in OpenPGP format. */
-static const char oid_crv25519[] =
+static const char oid_cv25519[] =
{ 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x97, 0x55, 0x01, 0x05, 0x01 };
@@ -298,7 +298,7 @@ openpgp_oid_is_ed25519 (gcry_mpi_t a)
int
-openpgp_oid_is_crv25519 (gcry_mpi_t a)
+openpgp_oid_is_cv25519 (gcry_mpi_t a)
{
const unsigned char *buf;
unsigned int nbits;
@@ -309,8 +309,8 @@ openpgp_oid_is_crv25519 (gcry_mpi_t a)
buf = gcry_mpi_get_opaque (a, &nbits);
n = (nbits+7)/8;
- return (n == DIM (oid_crv25519)
- && !memcmp (buf, oid_crv25519, DIM (oid_crv25519)));
+ return (n == DIM (oid_cv25519)
+ && !memcmp (buf, oid_cv25519, DIM (oid_cv25519)));
}
diff --git a/common/util.h b/common/util.h
index 1c3cce9..f293234 100644
--- a/common/util.h
+++ b/common/util.h
@@ -206,7 +206,7 @@ size_t percent_unescape_inplace (char *string, int nulrepl);
gpg_error_t openpgp_oid_from_str (const char *string, gcry_mpi_t *r_mpi);
char *openpgp_oid_to_str (gcry_mpi_t a);
int openpgp_oid_is_ed25519 (gcry_mpi_t a);
-int openpgp_oid_is_crv25519 (gcry_mpi_t a);
+int openpgp_oid_is_cv25519 (gcry_mpi_t a);
const char *openpgp_curve_to_oid (const char *name, unsigned int *r_nbits);
const char *openpgp_oid_to_curve (const char *oid, int canon);
const char *openpgp_enum_curves (int *idxp);
diff --git a/g10/keyid.c b/g10/keyid.c
index 84990a3..ea6ed5e 100644
--- a/g10/keyid.c
+++ b/g10/keyid.c
@@ -919,7 +919,7 @@ keygrip_from_pk (PKT_public_key *pk, unsigned char *array)
pk->pubkey_algo == PUBKEY_ALGO_EDDSA?
"(public-key(ecc(curve%s)(flags eddsa)(q%m)))":
(pk->pubkey_algo == PUBKEY_ALGO_ECDH
- && openpgp_oid_is_crv25519 (pk->pkey[0]))?
+ && openpgp_oid_is_cv25519 (pk->pkey[0]))?
"(public-key(ecc(curve%s)(flags djb-tweak)(q%m)))":
"(public-key(ecc(curve%s)(q%m)))",
curve, pk->pkey[1]);
diff --git a/g10/pkglue.c b/g10/pkglue.c
index 232c489..7de2fa7 100644
--- a/g10/pkglue.c
+++ b/g10/pkglue.c
@@ -227,7 +227,7 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data,
rc = gpg_error_from_syserror ();
else
{
- int with_djb_tweak_flag = openpgp_oid_is_crv25519 (pkey[0]);
+ int with_djb_tweak_flag = openpgp_oid_is_cv25519 (pkey[0]);
/* Now use the ephemeral secret to compute the shared point. */
rc = gcry_sexp_build (&s_pkey, NULL,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list