-/* $OpenBSD: bn.h,v 1.55 2022/07/12 14:42:48 kn Exp $ */
+/* $OpenBSD: bn.h,v 1.56 2022/11/30 01:47:19 jsing Exp $ */
/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
extern "C" {
#endif
-/* These preprocessor symbols control various aspects of the bignum headers and
- * library code. They're not defined by any "normal" configuration, as they are
- * intended for development and testing purposes. NB: defining all three can be
- * useful for debugging application code as well as openssl itself.
- *
- * BN_DEBUG - turn on various debugging alterations to the bignum code
- * BN_DEBUG_RAND - uses random poisoning of unused words to trip up
- * mismanagement of bignum internals. You must also define BN_DEBUG.
- */
-/* #define BN_DEBUG */
-/* #define BN_DEBUG_RAND */
-
#ifndef OPENSSL_SMALL_FOOTPRINT
#define BN_MUL_COMBA
#define BN_SQR_COMBA
-/* $OpenBSD: bn_asm.c,v 1.16 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_asm.c,v 1.17 2022/11/30 01:47:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* [including the GNU Public Licence.]
*/
-#ifndef BN_DEBUG
-# undef NDEBUG /* avoid conflicting definitions */
-# define NDEBUG
-#endif
-
#include <assert.h>
#include <stdio.h>
-/* $OpenBSD: bn_ctx.c,v 1.18 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_ctx.c,v 1.19 2022/11/30 01:47:19 jsing Exp $ */
/* Written by Ulf Moeller for the OpenSSL project. */
/* ====================================================================
* Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
*
*/
-#if !defined(BN_CTX_DEBUG) && !defined(BN_DEBUG)
-#ifndef NDEBUG
-#define NDEBUG
-#endif
-#endif
-
#include <stdio.h>
#include <string.h>
-/* $OpenBSD: bn_gf2m.c,v 1.28 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_gf2m.c,v 1.29 2022/11/30 01:47:19 jsing Exp $ */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
ret = 1;
err:
-#ifdef BN_DEBUG /* BN_CTX_end would complain about the expanded form */
- bn_correct_top(c);
- bn_correct_top(u);
- bn_correct_top(v);
-#endif
BN_CTX_end(ctx);
return ret;
}
-/* $OpenBSD: bn_lib.c,v 1.63 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_lib.c,v 1.64 2022/11/30 01:47:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* [including the GNU Public Licence.]
*/
-#ifndef BN_DEBUG
-# undef NDEBUG /* avoid conflicting definitions */
-# define NDEBUG
-#endif
-
#include <assert.h>
#include <limits.h>
#include <stdio.h>
-/* $OpenBSD: bn_mul.c,v 1.23 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_mul.c,v 1.24 2022/11/30 01:47:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* [including the GNU Public Licence.]
*/
-#ifndef BN_DEBUG
-# undef NDEBUG /* avoid conflicting definitions */
-# define NDEBUG
-#endif
-
#include <assert.h>
#include <stdio.h>
#include <string.h>
-/* $OpenBSD: bn_nist.c,v 1.23 2022/11/26 16:08:51 tb Exp $ */
+/* $OpenBSD: bn_nist.c,v 1.24 2022/11/30 01:47:19 jsing Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project
*/
{
int i;
-#ifdef BN_DEBUG
- OPENSSL_assert(top <= max);
-#endif
for (i = 0; i < top; i++)
dst[i] = src[i];
for (; i < max; i++)