diff options
Diffstat (limited to 'common/userids.c')
-rw-r--r-- | common/userids.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/common/userids.c b/common/userids.c index 41cf2876c..181b48866 100644 --- a/common/userids.c +++ b/common/userids.c @@ -327,9 +327,10 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) } desc->u.fpr[i] = c; } + desc->fprlen = 16; for (; i < 32; i++) desc->u.fpr[i]= 0; - mode = KEYDB_SEARCH_MODE_FPR16; + mode = KEYDB_SEARCH_MODE_FPR; } else if ((hexlength == 40 && (s[hexlength] == 0 @@ -350,9 +351,10 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) } desc->u.fpr[i] = c; } + desc->fprlen = 20; for (; i < 32; i++) desc->u.fpr[i]= 0; - mode = KEYDB_SEARCH_MODE_FPR20; + mode = KEYDB_SEARCH_MODE_FPR; } else if ((hexlength == 64 && (s[hexlength] == 0 @@ -373,7 +375,8 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) } desc->u.fpr[i] = c; } - mode = KEYDB_SEARCH_MODE_FPR32; + desc->fprlen = 32; + mode = KEYDB_SEARCH_MODE_FPR; } else if (!hexprefix) { @@ -393,7 +396,10 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) desc->u.fpr[i] = c; } if (i == 20) - mode = KEYDB_SEARCH_MODE_FPR20; + { + desc->fprlen = 20; + mode = KEYDB_SEARCH_MODE_FPR; + } for (; i < 32; i++) desc->u.fpr[i]= 0; } @@ -438,7 +444,10 @@ classify_user_id (const char *name, KEYDB_SEARCH_DESC *desc, int openpgp_hack) s += 2; } if (i == 20) - mode = KEYDB_SEARCH_MODE_FPR20; + { + desc->fprlen = 20; + mode = KEYDB_SEARCH_MODE_FPR; + } for (; i < 32; i++) desc->u.fpr[i]= 0; } |