Commit 437e5050 authored by Matt Caswell's avatar Matt Caswell
Browse files

Remove OPENSSL_assert() usage from crypto/bn

parent 86f31dd9
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ extern "C" {
 */

# ifdef BN_DEBUG

#  include <assert.h>
#  ifdef BN_DEBUG_RAND
#   define bn_pollute(a) \
        do { \
@@ -169,7 +169,7 @@ extern "C" {
        do { \
                const BIGNUM *_bnum2 = (a); \
                if (_bnum2 != NULL) { \
                        OPENSSL_assert(((_bnum2->top == 0) && !_bnum2->neg) || \
                        assert(((_bnum2->top == 0) && !_bnum2->neg) || \
                               (_bnum2->top && (_bnum2->d[_bnum2->top - 1] != 0))); \
                        bn_pollute(_bnum2); \
                } \
@@ -181,7 +181,7 @@ extern "C" {
#  define bn_wcheck_size(bn, words) \
        do { \
                const BIGNUM *_bnum2 = (bn); \
                OPENSSL_assert((words) <= (_bnum2)->dmax && \
                assert((words) <= (_bnum2)->dmax && \
                       (words) >= (_bnum2)->top); \
                /* avoid unused variable warning with NDEBUG */ \
                (void)(_bnum2); \
+1 −1
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ static void nist_cp_bn_0(BN_ULONG *dst, const BN_ULONG *src, int top, int max)
    int i;

#ifdef BN_DEBUG
    OPENSSL_assert(top <= max);
    assert(top <= max);
#endif
    for (i = 0; i < top; i++)
        dst[i] = src[i];