summaryrefslogtreecommitdiff
path: root/lib/libcrypto/aes
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/aes
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/aes')
-rw-r--r--lib/libcrypto/aes/aes_core.c5
-rw-r--r--lib/libcrypto/aes/aes_ecb.c6
-rw-r--r--lib/libcrypto/aes/aes_ige.c6
-rw-r--r--lib/libcrypto/aes/aes_x86core.c5
4 files changed, 5 insertions, 17 deletions
diff --git a/lib/libcrypto/aes/aes_core.c b/lib/libcrypto/aes/aes_core.c
index ee21057392c..93c32b919b3 100644
--- a/lib/libcrypto/aes/aes_core.c
+++ b/lib/libcrypto/aes/aes_core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aes_core.c,v 1.11 2014/07/09 09:10:07 miod Exp $ */
+/* $OpenBSD: aes_core.c,v 1.12 2015/02/10 09:46:30 miod Exp $ */
/**
* rijndael-alg-fst.c
*
@@ -33,7 +33,6 @@
# define NDEBUG
# endif
#endif
-#include <assert.h>
#include <stdlib.h>
#include <openssl/aes.h>
@@ -795,7 +794,6 @@ AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
int r;
#endif /* ?FULL_UNROLL */
- assert(in && out && key);
rk = key->rd_key;
/*
@@ -986,7 +984,6 @@ AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
int r;
#endif /* ?FULL_UNROLL */
- assert(in && out && key);
rk = key->rd_key;
/*
diff --git a/lib/libcrypto/aes/aes_ecb.c b/lib/libcrypto/aes/aes_ecb.c
index 976c48fdbc2..b05e53994b2 100644
--- a/lib/libcrypto/aes/aes_ecb.c
+++ b/lib/libcrypto/aes/aes_ecb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aes_ecb.c,v 1.5 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: aes_ecb.c,v 1.6 2015/02/10 09:46:30 miod Exp $ */
/* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
*
@@ -54,7 +54,6 @@
# define NDEBUG
# endif
#endif
-#include <assert.h>
#include <openssl/aes.h>
#include "aes_locl.h"
@@ -63,9 +62,6 @@ void
AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc)
{
- assert(in && out && key);
- assert((AES_ENCRYPT == enc) || (AES_DECRYPT == enc));
-
if (AES_ENCRYPT == enc)
AES_encrypt(in, out, key);
else
diff --git a/lib/libcrypto/aes/aes_ige.c b/lib/libcrypto/aes/aes_ige.c
index a8dec0a3612..16ef5612eb7 100644
--- a/lib/libcrypto/aes/aes_ige.c
+++ b/lib/libcrypto/aes/aes_ige.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aes_ige.c,v 1.6 2014/07/11 08:44:47 jsing Exp $ */
+/* $OpenBSD: aes_ige.c,v 1.7 2015/02/10 09:46:30 miod Exp $ */
/* ====================================================================
* Copyright (c) 2006 The OpenSSL Project. All rights reserved.
*
@@ -81,10 +81,8 @@ AES_ige_encrypt(const unsigned char *in, unsigned char *out, size_t length,
const AES_KEY *key, unsigned char *ivec, const int enc)
{
size_t n;
- size_t len = length;
+ size_t len;
- OPENSSL_assert(in && out && key && ivec);
- OPENSSL_assert((AES_ENCRYPT == enc) || (AES_DECRYPT == enc));
OPENSSL_assert((length % AES_BLOCK_SIZE) == 0);
len = length / AES_BLOCK_SIZE;
diff --git a/lib/libcrypto/aes/aes_x86core.c b/lib/libcrypto/aes/aes_x86core.c
index c7a2e0a9a65..c604fa876f4 100644
--- a/lib/libcrypto/aes/aes_x86core.c
+++ b/lib/libcrypto/aes/aes_x86core.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aes_x86core.c,v 1.7 2014/10/28 07:35:58 jsg Exp $ */
+/* $OpenBSD: aes_x86core.c,v 1.8 2015/02/10 09:46:30 miod Exp $ */
/**
* rijndael-alg-fst.c
*
@@ -40,7 +40,6 @@
# define NDEBUG
# endif
#endif
-#include <assert.h>
#include <stdlib.h>
#include <openssl/aes.h>
@@ -661,7 +660,6 @@ AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
u32 s0, s1, s2, s3, t[4];
int r;
- assert(in && out && key);
rk = key->rd_key;
/*
@@ -881,7 +879,6 @@ AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
u32 s0, s1, s2, s3, t[4];
int r;
- assert(in && out && key);
rk = key->rd_key;
/*