]> andersk Git - openssh.git/blobdiff - cipher.c
Remove redundant inclusion of config.h
[openssh.git] / cipher.c
index ade17dbc8b785549e4a8ca3c118742a5ce237d79..b55a4ac5809c28f8034c5833f75c921361445e43 100644 (file)
--- a/cipher.c
+++ b/cipher.c
@@ -11,7 +11,6 @@ Created: Wed Apr 19 17:41:39 1995 ylo
 
 */
 
-#include "config.h"
 #include "includes.h"
 RCSID("$Id$");
 
@@ -93,8 +92,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 +245,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 +278,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)
     {
This page took 0.031259 seconds and 4 git commands to generate.