summaryrefslogtreecommitdiffstats
path: root/sm/keydb.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2001-12-20 14:25:08 +0100
committerWerner Koch <wk@gnupg.org>2001-12-20 14:25:08 +0100
commit5f116e95400453a6053b9b631eccc6d224b01cc9 (patch)
tree4f142116fa01e042d72bea79b1d59efba6fd2ec4 /sm/keydb.c
parent* keybox-blob.c (_keybox_create_x509_blob): Skip the leading (diff)
downloadgnupg2-5f116e95400453a6053b9b631eccc6d224b01cc9.tar.xz
gnupg2-5f116e95400453a6053b9b631eccc6d224b01cc9.zip
* base64.c (base64_reader_cb): Try to detect an S/MIME body part.
* certdump.c (print_sexp): Renamed to gpgsm_dump_serial, made global. (print_time): Renamed to gpgsm_dump_time, made global. (gpgsm_dump_serial): Take a real S-Expression as argument and print the first item. * keylist.c (list_cert_colon): Ditto. * keydb.c (keydb_search_issuer_sn): Ditto. * decrypt.c (print_integer_sexp): Removed and made callers use gpgsm_dump_serial. * verify.c (print_time): Removed, made callers use gpgsm_dump_time.
Diffstat (limited to 'sm/keydb.c')
-rw-r--r--sm/keydb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sm/keydb.c b/sm/keydb.c
index b80f42642..9a39b67fb 100644
--- a/sm/keydb.c
+++ b/sm/keydb.c
@@ -842,7 +842,11 @@ keydb_search_issuer_sn (KEYDB_HANDLE hd,
memset (&desc, 0, sizeof desc);
desc.mode = KEYDB_SEARCH_MODE_ISSUER_SN;
- for (s=serial,desc.snlen = 0; digitp (s); s++)
+ s = serial;
+ if (*s !='(')
+ return GNUPG_Invalid_Value;
+ s++;
+ for (desc.snlen = 0; digitp (s); s++)
desc.snlen = 10*desc.snlen + atoi_1 (s);
if (*s !=':')
return GNUPG_Invalid_Value;