summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_blind.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2006-06-23 15:21:36 +0000
committerBodo Möller <bodo@openssl.org>2006-06-23 15:21:36 +0000
commit48fc582f66a58e3da6f095ba1b4498c17581e05a (patch)
tree8750d220a6755e61e7b064e4cfdf180feaf04bd7 /crypto/bn/bn_blind.c
parent81de1028bc8e2384af5e3f50fdad2e72f8cfc4f8 (diff)
New functions CRYPTO_set_idptr_callback(),
CRYPTO_get_idptr_callback(), CRYPTO_thread_idptr() for a 'void *' type thread ID, since the 'unsigned long' type of the existing thread ID does not always work well.
Diffstat (limited to 'crypto/bn/bn_blind.c')
-rw-r--r--crypto/bn/bn_blind.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c
index ca22d4f8bd..ccecc63cda 100644
--- a/crypto/bn/bn_blind.c
+++ b/crypto/bn/bn_blind.c
@@ -1,6 +1,6 @@
/* crypto/bn/bn_blind.c */
/* ====================================================================
- * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
+ * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -123,6 +123,8 @@ struct bn_blinding_st
BIGNUM *mod; /* just a reference */
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 */
+ 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;
@@ -267,6 +269,16 @@ void BN_BLINDING_set_thread_id(BN_BLINDING *b, unsigned long n)
b->thread_id = n;
}
+void *BN_BLINDING_get_thread_idptr(const BN_BLINDING *b)
+ {
+ return b->thread_idptr;
+ }
+
+void BN_BLINDING_set_thread_idptr(BN_BLINDING *b, void *p)
+ {
+ b->thread_idptr = p;
+ }
+
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *b)
{
return b->flags;