From 76c80021d4da0755dbb04bd5d42f32015cba0b9a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 27 Sep 2017 09:33:14 +0200 Subject: common: Add constant KEYGRIP_LEN. * common/util.h (KEYGRIP_LEN): New. * g10/call-agent.c (agent_probe_any_secret_key): Use that constant. * g10/keyid.c (keygrip_from_pk): Ditto. Signed-off-by: Werner Koch --- common/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common/util.h') diff --git a/common/util.h b/common/util.h index c6d19c64b..f3722812d 100644 --- a/common/util.h +++ b/common/util.h @@ -59,6 +59,11 @@ /* Hash function used with libksba. */ #define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write) +/* The length of the keygrip. This is a SHA-1 hash of the key + * parameters as generated by gcry_pk_get_keygrip. */ +#define KEYGRIP_LEN 20 + + /* Get all the stuff from jnlib. */ #include "../common/logging.h" #include "../common/argparse.h" -- cgit v1.2.3