X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbn%2Fbn_depr.c;h=d55397016a5143fde8b08c0eafa74a463ca13fb2;hp=8c30c2190e70b86d50bb864245ffb5ecb19af2bf;hb=HEAD;hpb=fcd2d5a6121ad3e5e65edc714ad99fc36f609f81 diff --git a/crypto/bn/bn_depr.c b/crypto/bn/bn_depr.c index 8c30c2190e..d55397016a 100644 --- a/crypto/bn/bn_depr.c +++ b/crypto/bn/bn_depr.c @@ -1,7 +1,7 @@ /* - * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2002-2021 The OpenSSL Project Authors. 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 @@ -13,14 +13,11 @@ */ #include -#if OPENSSL_API_0_9_8 -NON_EMPTY_TRANSLATION_UNIT -#else -# include -# include -# include "internal/cryptlib.h" -# include "bn_lcl.h" +#include +#include +#include "internal/cryptlib.h" +#include "bn_local.h" BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, @@ -40,7 +37,7 @@ BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, goto err; /* we have a prime :-) */ - return ret; + return rnd; err: BN_free(rnd); return NULL; @@ -52,7 +49,7 @@ int BN_is_prime(const BIGNUM *a, int checks, { BN_GENCB cb; BN_GENCB_set_old(&cb, callback, cb_arg); - return BN_is_prime_ex(a, checks, ctx_passed, &cb); + return ossl_bn_check_prime(a, checks, ctx_passed, 0, &cb); } int BN_is_prime_fasttest(const BIGNUM *a, int checks, @@ -62,7 +59,5 @@ int BN_is_prime_fasttest(const BIGNUM *a, int checks, { BN_GENCB cb; BN_GENCB_set_old(&cb, callback, cb_arg); - return BN_is_prime_fasttest_ex(a, checks, ctx_passed, - do_trial_division, &cb); + return ossl_bn_check_prime(a, checks, ctx_passed, do_trial_division, &cb); } -#endif