diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/userids.c | 2 | ||||
-rw-r--r-- | common/util.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/common/userids.c b/common/userids.c index eb714a9af..5e2704362 100644 --- a/common/userids.c +++ b/common/userids.c @@ -256,7 +256,7 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) case '^': /* UBID */ { - if (hex2bin (s+1, desc->u.ubid, 20) < 0) + if (hex2bin (s+1, desc->u.ubid, UBID_LEN) < 0) { rc = gpg_error (GPG_ERR_INV_USER_ID); /* Invalid. */ goto out; diff --git a/common/util.h b/common/util.h index 6c878083a..fc869800a 100644 --- a/common/util.h +++ b/common/util.h @@ -55,6 +55,10 @@ * parameters as generated by gcry_pk_get_keygrip. */ #define KEYGRIP_LEN 20 +/* The length of the unique blob identifier as used by the keyboxd. + * This is the possible truncated fingerprint of the primary key. */ +#define UBID_LEN 20 + /* Get all the stuff from jnlib. */ #include "../common/logging.h" |