aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-01-21 16:37:26 +0100
committerTomas Mraz <tomas@openssl.org>2021-01-25 10:20:48 +0100
commitc27e7922211ac4f7aee5573f605c3b3cbef0d0bc (patch)
tree19a4376c5ce7743f00fab58e894d2692e3da9fdd /crypto
parentc9603dfa42d0643a6c8cac3e14364d9fd63303c4 (diff)
downloadopenssl-c27e7922211ac4f7aee5573f605c3b3cbef0d0bc.zip
openssl-c27e7922211ac4f7aee5573f605c3b3cbef0d0bc.tar.gz
openssl-c27e7922211ac4f7aee5573f605c3b3cbef0d0bc.tar.bz2
bn: Deprecate the X9.31 RSA key generation related functions
This key generation method is obsolete. Fixes #10111 Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/13921)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_x931p.c2
-rw-r--r--crypto/bn/build.info5
-rw-r--r--crypto/rsa/build.info5
-rw-r--r--crypto/rsa/rsa_x931g.c2
4 files changed, 9 insertions, 5 deletions
diff --git a/crypto/bn/bn_x931p.c b/crypto/bn/bn_x931p.c
index bca7c97..c7ecdd2 100644
--- a/crypto/bn/bn_x931p.c
+++ b/crypto/bn/bn_x931p.c
@@ -7,6 +7,8 @@
* https://www.openssl.org/source/license.html
*/
+#define OPENSSL_SUPPRESS_DEPRECATED
+
#include <stdio.h>
#include <openssl/bn.h>
#include "bn_local.h"
diff --git a/crypto/bn/build.info b/crypto/bn/build.info
index 6164bba..f732be2 100644
--- a/crypto/bn/build.info
+++ b/crypto/bn/build.info
@@ -105,11 +105,10 @@ $COMMON=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_ctx.c bn_mul.c \
bn_mod.c bn_conv.c bn_rand.c bn_shift.c bn_word.c bn_blind.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 bn_const.c
+ bn_intern.c bn_dh.c bn_rsa_fips186_4.c bn_const.c
SOURCE[../../libcrypto]=$COMMON $BNASM bn_print.c bn_err.c bn_srp.c
IF[{- !$disabled{'deprecated-3.0'} -}]
- SOURCE[../../libcrypto]=bn_depr.c
+ SOURCE[../../libcrypto]=bn_depr.c bn_x931p.c
ENDIF
SOURCE[../../providers/libfips.a]=$COMMON $BNASM
SOURCE[../../providers/liblegacy.a]=$BNASM
diff --git a/crypto/rsa/build.info b/crypto/rsa/build.info
index 1614996..d97e07f 100644
--- a/crypto/rsa/build.info
+++ b/crypto/rsa/build.info
@@ -2,7 +2,7 @@ LIBS=../../libcrypto
$COMMON=rsa_ossl.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_pk1.c \
rsa_none.c rsa_oaep.c rsa_chk.c rsa_pss.c rsa_x931.c rsa_crpt.c \
- rsa_x931g.c rsa_sp800_56b_gen.c rsa_sp800_56b_check.c rsa_backend.c \
+ rsa_sp800_56b_gen.c rsa_sp800_56b_check.c rsa_backend.c \
rsa_mp_names.c rsa_schemes.c
SOURCE[../../libcrypto]=$COMMON\
@@ -11,6 +11,9 @@ SOURCE[../../libcrypto]=$COMMON\
IF[{- !$disabled{'deprecated-0.9.8'} -}]
SOURCE[../../libcrypto]=rsa_depr.c
ENDIF
+IF[{- !$disabled{'deprecated-3.0'} -}]
+ SOURCE[../../libcrypto]=rsa_x931g.c
+ENDIF
SOURCE[../../providers/libfips.a]=$COMMON
diff --git a/crypto/rsa/rsa_x931g.c b/crypto/rsa/rsa_x931g.c
index 211e717..6c50bd9 100644
--- a/crypto/rsa/rsa_x931g.c
+++ b/crypto/rsa/rsa_x931g.c
@@ -11,7 +11,7 @@
* RSA low level APIs are deprecated for public use, but still ok for
* internal use.
*/
-#include "internal/deprecated.h"
+#define OPENSSL_SUPPRESS_DEPRECATED
#include <stdio.h>
#include <string.h>