From: Niels Möller Date: Mon, 11 Jun 2001 23:51:39 +0000 (+0200) Subject: * des.c (des_encrypt, des_decrypt): Assert that the key setup was X-Git-Tag: release_nettle_0.2.20010617~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=072dd6ef63796893d99ce3749ce1c4048684c3d8;p=thirdparty%2Fnettle.git * des.c (des_encrypt, des_decrypt): Assert that the key setup was successful. Rev: src/nettle/des.c:1.2 --- diff --git a/des.c b/des.c index 365113c0..ce25f8ac 100644 --- a/des.c +++ b/des.c @@ -209,7 +209,8 @@ des_encrypt(struct des_ctx *ctx, const uint8_t *src) { assert(!(length % DES_BLOCK_SIZE)); - + assert(ctx->status == DES_OK); + while (length) { DesSmallFipsEncrypt(dst, ctx->key, src); @@ -225,6 +226,7 @@ des_decrypt(struct des_ctx *ctx, const uint8_t *src) { assert(!(length % DES_BLOCK_SIZE)); + assert(ctx->status == DES_OK); while (length) {