X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Frsa%2Frsa_depr.c;h=18e406594a76f3a555917ed761ef1cc0eca98844;hb=9ff9bccc41c385ec2aa8ee2123f083b52b56b7b4;hp=a6ec38548b6512c8ae2e17c27ca703dfaf6f31be;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5;p=oweals%2Fopenssl.git diff --git a/crypto/rsa/rsa_depr.c b/crypto/rsa/rsa_depr.c index a6ec38548b..18e406594a 100644 --- a/crypto/rsa/rsa_depr.c +++ b/crypto/rsa/rsa_depr.c @@ -1,4 +1,3 @@ -/* crypto/rsa/rsa_depr.c */ /* ==================================================================== * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * @@ -58,18 +57,18 @@ * "new" versions). */ -#include -#include -#include "cryptlib.h" -#include -#include - -#ifdef OPENSSL_NO_DEPRECATED - -static void *dummy = &dummy; +#include +#if OPENSSL_API_COMPAT >= 0x00908000L +NON_EMPTY_TRANSLATION_UNIT #else +# include +# include +# include "internal/cryptlib.h" +# include +# include + RSA *RSA_generate_key(int bits, unsigned long e_value, void (*callback) (int, int, void *), void *cb_arg) { @@ -78,7 +77,7 @@ RSA *RSA_generate_key(int bits, unsigned long e_value, RSA *rsa = RSA_new(); BIGNUM *e = BN_new(); - if (!cb || !rsa || !e) + if (cb == NULL || rsa == NULL || e == NULL) goto err; /* @@ -99,12 +98,9 @@ RSA *RSA_generate_key(int bits, unsigned long e_value, return rsa; } err: - if (e) - BN_free(e); - if (rsa) - RSA_free(rsa); - if (cb) - BN_GENCB_free(cb); + BN_free(e); + RSA_free(rsa); + BN_GENCB_free(cb); return 0; } #endif