Revert my earlier CRYPTO_THREADID commit, I will commit a reworked
version some time soon.
This commit is contained in:
@@ -129,7 +129,6 @@
|
||||
#ifndef OPENSSL_NO_FP_API
|
||||
#include <stdio.h> /* FILE */
|
||||
#endif
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/ossl_typ.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -565,12 +564,10 @@ int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
||||
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_thread_id(BN_BLINDING *, unsigned long);
|
||||
#endif
|
||||
void BN_BLINDING_set_thread(BN_BLINDING *);
|
||||
int BN_BLINDING_cmp_thread(const BN_BLINDING *, const CRYPTO_THREADID *);
|
||||
void *BN_BLINDING_get_thread_idptr(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_thread_idptr(BN_BLINDING *, void *);
|
||||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
||||
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
||||
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
||||
|
||||
@@ -121,13 +121,10 @@ struct bn_blinding_st
|
||||
BIGNUM *Ai;
|
||||
BIGNUM *e;
|
||||
BIGNUM *mod; /* just a reference */
|
||||
/* FIXME: should really try to remove these, but the deprecated APIs that are
|
||||
* using them would need to be fudged somehow. */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
unsigned long thread_id; /* added in OpenSSL 0.9.6j and 0.9.7b;
|
||||
* used only by crypto/rsa/rsa_eay.c, rsa_lib.c */
|
||||
#endif
|
||||
CRYPTO_THREADID tid;
|
||||
void *thread_idptr; /* added in OpenSSL 0.9.9;
|
||||
* used only by crypto/rsa/rsa_eay.c, rsa_lib.c */
|
||||
unsigned int counter;
|
||||
unsigned long flags;
|
||||
BN_MONT_CTX *m_ctx;
|
||||
@@ -268,7 +265,6 @@ int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b, BN_CTX *ct
|
||||
return(ret);
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
unsigned long BN_BLINDING_get_thread_id(const BN_BLINDING *b)
|
||||
{
|
||||
return b->thread_id;
|
||||
@@ -278,16 +274,15 @@ void BN_BLINDING_set_thread_id(BN_BLINDING *b, unsigned long n)
|
||||
{
|
||||
b->thread_id = n;
|
||||
}
|
||||
#endif
|
||||
|
||||
void BN_BLINDING_set_thread(BN_BLINDING *b)
|
||||
void *BN_BLINDING_get_thread_idptr(const BN_BLINDING *b)
|
||||
{
|
||||
CRYPTO_THREADID_set(&b->tid);
|
||||
return b->thread_idptr;
|
||||
}
|
||||
|
||||
int BN_BLINDING_cmp_thread(const BN_BLINDING *b, const CRYPTO_THREADID *tid)
|
||||
void BN_BLINDING_set_thread_idptr(BN_BLINDING *b, void *p)
|
||||
{
|
||||
return CRYPTO_THREADID_cmp(&b->tid, tid);
|
||||
b->thread_idptr = p;
|
||||
}
|
||||
|
||||
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *b)
|
||||
|
||||
@@ -187,7 +187,7 @@ int main(int argc, char *argv[])
|
||||
BN_free(b);
|
||||
BN_free(m);
|
||||
BN_CTX_free(ctx);
|
||||
ERR_remove_thread_state(NULL);
|
||||
ERR_remove_state(0);
|
||||
CRYPTO_mem_leaks(out);
|
||||
BIO_free(out);
|
||||
printf(" done\n");
|
||||
|
||||
Reference in New Issue
Block a user