summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/cbc128.c
diff options
context:
space:
mode:
authormiod <>2015-02-10 09:46:30 +0000
committermiod <>2015-02-10 09:46:30 +0000
commitc54f1e6efb3beda80d415ba75614cbc695f799be (patch)
tree8bb4657eb5417a2a0ea6710585ef13aa7b25433c /src/lib/libcrypto/modes/cbc128.c
parentbedef42af36243e74221aa77e809718c15fae035 (diff)
downloadopenbsd-c54f1e6efb3beda80d415ba75614cbc695f799be.tar.gz
openbsd-c54f1e6efb3beda80d415ba75614cbc695f799be.tar.bz2
openbsd-c54f1e6efb3beda80d415ba75614cbc695f799be.zip
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 'src/lib/libcrypto/modes/cbc128.c')
-rw-r--r--src/lib/libcrypto/modes/cbc128.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/libcrypto/modes/cbc128.c b/src/lib/libcrypto/modes/cbc128.c
index 74fcdbe6e3..fe45103b0c 100644
--- a/src/lib/libcrypto/modes/cbc128.c
+++ b/src/lib/libcrypto/modes/cbc128.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cbc128.c,v 1.3 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: cbc128.c,v 1.4 2015/02/10 09:46:30 miod Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2008 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -58,7 +58,6 @@
58# define NDEBUG 58# define NDEBUG
59# endif 59# endif
60#endif 60#endif
61#include <assert.h>
62 61
63#undef STRICT_ALIGNMENT 62#undef STRICT_ALIGNMENT
64#ifdef __STRICT_ALIGNMENT 63#ifdef __STRICT_ALIGNMENT
@@ -74,8 +73,6 @@ void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out,
74 size_t n; 73 size_t n;
75 const unsigned char *iv = ivec; 74 const unsigned char *iv = ivec;
76 75
77 assert(in && out && key && ivec);
78
79#if !defined(OPENSSL_SMALL_FOOTPRINT) 76#if !defined(OPENSSL_SMALL_FOOTPRINT)
80 if (STRICT_ALIGNMENT && 77 if (STRICT_ALIGNMENT &&
81 ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(size_t) != 0) { 78 ((size_t)in|(size_t)out|(size_t)ivec)%sizeof(size_t) != 0) {
@@ -123,8 +120,6 @@ void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,
123 size_t n; 120 size_t n;
124 union { size_t t[16/sizeof(size_t)]; unsigned char c[16]; } tmp; 121 union { size_t t[16/sizeof(size_t)]; unsigned char c[16]; } tmp;
125 122
126 assert(in && out && key && ivec);
127
128#if !defined(OPENSSL_SMALL_FOOTPRINT) 123#if !defined(OPENSSL_SMALL_FOOTPRINT)
129 if (in != out) { 124 if (in != out) {
130 const unsigned char *iv = ivec; 125 const unsigned char *iv = ivec;