From fd7c911f090749774cf1869420523c4811beeeb0 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 8 Nov 1999 16:15:55 +1100 Subject: Merged OpenBSD CVS changes that go away --- cipher.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cipher.c') diff --git a/cipher.c b/cipher.c index e611d6c7..07491351 100644 --- a/cipher.c +++ b/cipher.c @@ -13,7 +13,7 @@ Created: Wed Apr 19 17:41:39 1995 ylo #include "config.h" #include "includes.h" -RCSID("$Id: cipher.c,v 1.3 1999/10/28 05:23:30 damien Exp $"); +RCSID("$Id: cipher.c,v 1.4 1999/11/08 05:15:55 damien Exp $"); #include "ssh.h" #include "cipher.h" @@ -93,8 +93,6 @@ swap_bytes(const unsigned char *src, unsigned char *dst_, int n) char c[4]; } t; - /* assert((n & 7) == 0); */ - /* Process 8 bytes every lap. */ for (n = n / 8; n > 0; n--) { @@ -248,7 +246,8 @@ void cipher_set_key(CipherContext *context, int cipher, void cipher_encrypt(CipherContext *context, unsigned char *dest, const unsigned char *src, unsigned int len) { - assert((len & 7) == 0); + if ((len & 7) != 0) + fatal("cipher_encrypt: bad plaintext length %d", len); switch (context->type) { @@ -280,7 +279,8 @@ void cipher_encrypt(CipherContext *context, unsigned char *dest, void cipher_decrypt(CipherContext *context, unsigned char *dest, const unsigned char *src, unsigned int len) { - assert((len & 7) == 0); + if ((len & 7) != 0) + fatal("cipher_decrypt: bad ciphertext length %d", len); switch (context->type) { -- cgit v1.2.3