summaryrefslogtreecommitdiff
path: root/lib/libcrypto/modes/cfb128.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-02-10 09:46:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-02-10 09:46:31 +0000
commit2a433f86abe5cca232890ffb150e501cfdeb3d4c (patch)
treecd6d0372a8f215ac240ca57c34e37a0bb24bde09 /lib/libcrypto/modes/cfb128.c
parentd6af4dd13b6fb52545728f54f1a744093d726bb9 (diff)
Remove assert() or OPENSSL_assert() of pointers being non-NULL. The policy
for libraries in OpenBSD is to deliberately let NULL pointers cause a SIGSEGV. ok doug@ jsing@
Diffstat (limited to 'lib/libcrypto/modes/cfb128.c')
-rw-r--r--lib/libcrypto/modes/cfb128.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/libcrypto/modes/cfb128.c b/lib/libcrypto/modes/cfb128.c
index 593c337e8b7..8399f0c5be0 100644
--- a/lib/libcrypto/modes/cfb128.c
+++ b/lib/libcrypto/modes/cfb128.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfb128.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */
+/* $OpenBSD: cfb128.c,v 1.4 2015/02/10 09:46:30 miod Exp $ */
/* ====================================================================
* Copyright (c) 2008 The OpenSSL Project. All rights reserved.
*
@@ -58,7 +58,6 @@
# define NDEBUG
# endif
#endif
-#include <assert.h>
/* The input and output encrypted as though 128bit cfb mode is being
* used. The extra state information to record how much of the
@@ -72,8 +71,6 @@ void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out,
unsigned int n;
size_t l = 0;
- assert(in && out && key && ivec && num);
-
n = *num;
if (enc) {
@@ -215,9 +212,6 @@ void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out,
size_t n;
unsigned char c[1],d[1];
- assert(in && out && key && ivec && num);
- assert(*num == 0);
-
for(n=0 ; n<bits ; ++n)
{
c[0]=(in[n/8]&(1 << (7-n%8))) ? 0x80 : 0;
@@ -234,9 +228,6 @@ void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out,
{
size_t n;
- assert(in && out && key && ivec && num);
- assert(*num == 0);
-
for(n=0 ; n<length ; ++n)
cfbr_encrypt_block(&in[n],&out[n],8,key,ivec,enc,block);
}