summaryrefslogtreecommitdiff
path: root/cipher/md.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2008-08-20 17:59:42 +0000
committerWerner Koch <wk@gnupg.org>2008-08-20 17:59:42 +0000
commit2f818ed3f919a9f8f565b67007b194fa953e7d9b (patch)
tree72827351385a8fb1e13998f9df6864287bec2dcf /cipher/md.c
parentee4d4642216dd04c84a360a5dd59c090e095114c (diff)
downloadlibgcrypt-2f818ed3f919a9f8f565b67007b194fa953e7d9b.tar.gz
Replace assert calls by a new gcry_assert at most places.
Diffstat (limited to 'cipher/md.c')
-rw-r--r--cipher/md.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cipher/md.c b/cipher/md.c
index 2cc25b77..7ca4a214 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <assert.h>
#include "g10lib.h"
#include "cipher.h"
@@ -627,10 +626,10 @@ md_copy (gcry_md_hd_t ahd, gcry_md_hd_t *b_hd)
{
bhd->ctx = b = (struct gcry_md_context *) ((char *) bhd + n);
/* No need to copy the buffer due to the write above. */
- assert (ahd->bufsize == (n - sizeof (struct gcry_md_handle) + 1));
+ gcry_assert (ahd->bufsize == (n - sizeof (struct gcry_md_handle) + 1));
bhd->bufsize = ahd->bufsize;
bhd->bufpos = 0;
- assert (! ahd->bufpos);
+ gcry_assert (! ahd->bufpos);
memcpy (b, a, sizeof *a);
b->list = NULL;
b->debug = NULL;
@@ -843,7 +842,7 @@ prepare_macpads( gcry_md_hd_t hd, const byte *key, size_t keylen)
gcry_md_hash_buffer ( algo, helpkey, key, keylen );
key = helpkey;
keylen = md_digest_length( algo );
- assert ( keylen <= 64 );
+ gcry_assert ( keylen <= 64 );
}
memset ( hd->ctx->macpads, 0, 2*(hd->ctx->macpads_Bsize) );