diff options
author | Werner Koch <wk@gnupg.org> | 2006-10-05 13:06:42 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2006-10-05 13:06:42 +0200 |
commit | 158a69aff7b75fa3a6bd5e6990520852c602ae03 (patch) | |
tree | ac99d3084ba3aa1bf33fa245bff546a6afa85092 /sm | |
parent | * gpgrlhelp.c: readline requires stdio.h. (diff) | |
download | gnupg2-158a69aff7b75fa3a6bd5e6990520852c602ae03.tar.xz gnupg2-158a69aff7b75fa3a6bd5e6990520852c602ae03.zip |
bug fixes
Diffstat (limited to 'sm')
-rw-r--r-- | sm/ChangeLog | 4 | ||||
-rw-r--r-- | sm/certcheck.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog index dd469ae16..1a4157717 100644 --- a/sm/ChangeLog +++ b/sm/ChangeLog @@ -1,3 +1,7 @@ +2006-10-05 Werner Koch <wk@g10code.com> + + * certcheck.c (do_encode_md): Check that the has algo is valid. + 2006-10-02 Marcus Brinkmann <marcus@g10code.de> * server.c (register_commands): New commands DUMPKEYS and diff --git a/sm/certcheck.c b/sm/certcheck.c index e8b842b88..efb1414cc 100644 --- a/sm/certcheck.c +++ b/sm/certcheck.c @@ -68,6 +68,8 @@ do_encode_md (gcry_md_hd_t md, int algo, int pkalgo, unsigned int nbits, nframe = (nbits+7) / 8; asnlen = DIM(asn); + if (!algo || gcry_md_test_algo (algo)) + return gpg_error (GPG_ERR_DIGEST_ALGO); if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen)) { log_error ("no object identifier for algo %d\n", algo); |