Latest update.
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -46,8 +46,8 @@ char *BN_bn2hex(const BIGNUM *a)
|
||||
return buf;
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
/* No BIO_snprintf in FIPS_MODE */
|
||||
#ifndef FIPS_MODULE
|
||||
/* No BIO_snprintf in FIPS_MODULE */
|
||||
/* Must 'OPENSSL_free' the returned data */
|
||||
char *BN_bn2dec(const BIGNUM *a)
|
||||
{
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -90,7 +90,7 @@ struct bignum_ctx {
|
||||
OPENSSL_CTX *libctx;
|
||||
};
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
/* Debugging functionality */
|
||||
static void ctxdbg(BIO *channel, const char *text, BN_CTX *ctx)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ static void ctxdbg(BIO *channel, const char *text, BN_CTX *ctx)
|
||||
#else
|
||||
/* TODO(3.0): Consider if we want to do this in FIPS mode */
|
||||
# define CTXDBG(str, ctx) do {} while(0)
|
||||
#endif /* FIPS_MODE */
|
||||
#endif /* FIPS_MODULE */
|
||||
|
||||
BN_CTX *BN_CTX_new_ex(OPENSSL_CTX *ctx)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ BN_CTX *BN_CTX_new_ex(OPENSSL_CTX *ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
BN_CTX *BN_CTX_new(void)
|
||||
{
|
||||
return BN_CTX_new_ex(NULL);
|
||||
@@ -159,7 +159,7 @@ BN_CTX *BN_CTX_secure_new_ex(OPENSSL_CTX *ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
BN_CTX *BN_CTX_secure_new(void)
|
||||
{
|
||||
return BN_CTX_secure_new_ex(NULL);
|
||||
@@ -170,7 +170,7 @@ void BN_CTX_free(BN_CTX *ctx)
|
||||
{
|
||||
if (ctx == NULL)
|
||||
return;
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
OSSL_TRACE_BEGIN(BN_CTX) {
|
||||
BN_POOL_ITEM *pool = ctx->pool.head;
|
||||
BIO_printf(trc_out,
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@
|
||||
|
||||
/* DH parameters from RFC3526 */
|
||||
|
||||
# ifndef FIPS_MODE
|
||||
# ifndef FIPS_MODULE
|
||||
/*
|
||||
* "1536-bit MODP Group" from RFC3526, Section 2.
|
||||
*
|
||||
@@ -60,7 +60,7 @@ static const BN_ULONG modp_1536_q[] = {
|
||||
BN_DEF(0x4533E63A, 0x94812704), BN_DEF(0xC06E0E68, 0x62633145),
|
||||
BN_DEF(0x10B4611A, 0xE487ED51), BN_DEF(0xFFFFFFFF, 0x7FFFFFFF)
|
||||
};
|
||||
# endif /* FIPS_MODE */
|
||||
# endif /* FIPS_MODULE */
|
||||
|
||||
/*-
|
||||
* "2048-bit MODP Group" from RFC3526, Section 3.
|
||||
@@ -1037,7 +1037,7 @@ make_dh_bn(ffdhe6144_q)
|
||||
make_dh_bn(ffdhe8192_p)
|
||||
make_dh_bn(ffdhe8192_q)
|
||||
|
||||
# ifndef FIPS_MODE
|
||||
# ifndef FIPS_MODULE
|
||||
make_dh_bn(modp_1536_p)
|
||||
make_dh_bn(modp_1536_q)
|
||||
# endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -207,7 +207,7 @@ int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
||||
return found;
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe,
|
||||
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
|
||||
{
|
||||
@@ -265,7 +265,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb)
|
||||
{
|
||||
int i, status, ret = -1;
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
BN_CTX *ctxlocal = NULL;
|
||||
#else
|
||||
|
||||
@@ -301,7 +301,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
|
||||
if (!BN_GENCB_call(cb, 1, -1))
|
||||
return -1;
|
||||
}
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
if (ctx == NULL && (ctxlocal = ctx = BN_CTX_new()) == NULL)
|
||||
goto err;
|
||||
#endif
|
||||
@@ -311,7 +311,7 @@ static int bn_is_prime_int(const BIGNUM *w, int checks, BN_CTX *ctx,
|
||||
goto err;
|
||||
ret = (status == BN_PRIMETEST_PROBABLY_PRIME);
|
||||
err:
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
BN_CTX_free(ctxlocal);
|
||||
#endif
|
||||
return ret;
|
||||
|
||||
+4
-4
@@ -103,7 +103,7 @@ int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, BN_CTX *ctx)
|
||||
{
|
||||
return bnrand(NORMAL, rnd, bits, top, bottom, ctx);
|
||||
}
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom)
|
||||
{
|
||||
return bnrand(NORMAL, rnd, bits, top, bottom, NULL);
|
||||
@@ -120,7 +120,7 @@ int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, BN_CTX *ctx)
|
||||
return bnrand(PRIVATE, rnd, bits, top, bottom, ctx);
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom)
|
||||
{
|
||||
return bnrand(PRIVATE, rnd, bits, top, bottom, NULL);
|
||||
@@ -199,7 +199,7 @@ int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, BN_CTX *ctx)
|
||||
return bnrand_range(NORMAL, r, range, ctx);
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int BN_rand_range(BIGNUM *r, const BIGNUM *range)
|
||||
{
|
||||
return bnrand_range(NORMAL, r, range, NULL);
|
||||
@@ -211,7 +211,7 @@ int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range, BN_CTX *ctx)
|
||||
return bnrand_range(PRIVATE, r, range, ctx);
|
||||
}
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int BN_priv_rand_range(BIGNUM *r, const BIGNUM *range)
|
||||
{
|
||||
return bnrand_range(PRIVATE, r, range, NULL);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2018-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2018-2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (the "License"). You may not use
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
|
||||
@@ -112,16 +112,18 @@ $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
|
||||
bn_kron.c bn_sqrt.c bn_gcd.c bn_prime.c bn_sqr.c \
|
||||
bn_recp.c bn_mont.c bn_mpi.c bn_exp2.c bn_gf2m.c bn_nist.c \
|
||||
bn_x931p.c bn_intern.c bn_dh.c \
|
||||
bn_rsa_fips186_4.c $BNDH $BNASM
|
||||
SOURCE[../../libcrypto]=$COMMON bn_print.c bn_err.c bn_srp.c
|
||||
bn_rsa_fips186_4.c $BNDH
|
||||
SOURCE[../../libcrypto]=$COMMON $BNASM bn_print.c bn_err.c bn_srp.c
|
||||
IF[{- !$disabled{'deprecated-3.0'} -}]
|
||||
SOURCE[../../libcrypto]=bn_depr.c
|
||||
ENDIF
|
||||
SOURCE[../../providers/libfips.a]=$COMMON
|
||||
SOURCE[../../providers/libfips.a]=$COMMON $BNASM
|
||||
SOURCE[../../providers/liblegacy.a]=$BNASM
|
||||
# Implementations are now spread across several libraries, so the defines
|
||||
# need to be applied to all affected libraries and modules.
|
||||
DEFINE[../../libcrypto]=$BNDEF
|
||||
DEFINE[../../providers/libfips.a]=$BNDEF
|
||||
DEFINE[../../providers/liblegacy.a]=$BNDEF
|
||||
DEFINE[../../providers/libimplementations.a]=$BNDEF
|
||||
|
||||
INCLUDE[../../libcrypto]=../../crypto/include
|
||||
|
||||
Reference in New Issue
Block a user