mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-29 03:36:27 +08:00
API compatible with OpenSSL before version 1.1.0
Add BN_init() and CRYPTO_num_locks(), compatible with OpenSSL 0.9.8. And change the default OpenSSL API to 1.1.0.
This commit is contained in:
@@ -173,6 +173,9 @@ int BN_num_bits(const BIGNUM *a);
|
||||
int BN_num_bits_word(BN_ULONG l);
|
||||
int BN_security_bits(int L, int N);
|
||||
BIGNUM *BN_new(void);
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
void BN_init(BIGNUM *a);
|
||||
# endif
|
||||
BIGNUM *BN_secure_new(void);
|
||||
void BN_clear_free(BIGNUM *a);
|
||||
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
||||
|
||||
@@ -215,7 +215,11 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
* On the other hand, the locking callbacks are no longer used. Consequently,
|
||||
* the callback management functions can be safely replaced with no-op macros.
|
||||
*/
|
||||
# define CRYPTO_num_locks() 1
|
||||
# if OPENSSL_API_COMPAT < 0x10100000L
|
||||
int CRYPTO_num_locks(void);
|
||||
# else
|
||||
# define CRYPTO_num_locks() (1)
|
||||
# endif
|
||||
# define CRYPTO_set_locking_callback(func)
|
||||
# define CRYPTO_get_locking_callback() (NULL)
|
||||
# define CRYPTO_set_add_lock_callback(func)
|
||||
|
||||
@@ -41,9 +41,9 @@ extern "C" {
|
||||
*/
|
||||
# define OPENSSL_VERSION_NUMBER 0x1010004fL
|
||||
# ifdef OPENSSL_FIPS
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.1.0 - OpenSSL 1.1.0d-fips 03 Jan 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.1.0 - OpenSSL 1.1.0d-fips 07 Jan 2018"
|
||||
# else
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.1.0 - OpenSSL 1.1.0d 03 Jan 2018"
|
||||
# define OPENSSL_VERSION_TEXT "GmSSL 2.1.0 - OpenSSL 1.1.0d 07 Jan 2018"
|
||||
# endif
|
||||
|
||||
/*-
|
||||
|
||||
Reference in New Issue
Block a user