Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Smith <brian@briansmith.org>2016-03-26 02:24:46 +0300
committerDavid Benjamin <davidben@google.com>2016-03-30 01:20:48 +0300
commitf08c1c68957024ced93d35d757daeb373de8f073 (patch)
treeb4423c91d5100d492401f2d09b4e50b388313f48 /include/openssl/rsa.h
parent3426d1011946b26ff1bb2fd98a081ba4753c9cc8 (diff)
Drop support for custom |mod_exp| hooks in |RSA_METHOD|.
The documentation in |RSA_METHOD| says that the |ctx| parameter to |mod_exp| can be NULL, however the default implementation doesn't handle that case. That wouldn't matter since internally it is always called with a non-NULL |ctx| and it is static, but an external application could get a pointer to |mod_exp| by extracting it from the default |RSA_METHOD|. That's unlikely, but making that impossible reduces the chances that future refactorings will cause unexpected trouble. Change-Id: Ie0e35e9f107551a16b49c1eb91d0d3386604e594 Reviewed-on: https://boringssl-review.googlesource.com/7580 Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'include/openssl/rsa.h')
-rw-r--r--include/openssl/rsa.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/openssl/rsa.h b/include/openssl/rsa.h
index 5dbc77ab..2cbb1f8a 100644
--- a/include/openssl/rsa.h
+++ b/include/openssl/rsa.h
@@ -408,9 +408,7 @@ OPENSSL_EXPORT void *RSA_get_ex_data(const RSA *r, int idx);
/* RSA_FLAG_NO_BLINDING disables blinding of private operations. */
#define RSA_FLAG_NO_BLINDING 8
-/* RSA_FLAG_EXT_PKEY means that private key operations will be handled by
- * |mod_exp| and that they do not depend on the private key components being
- * present: for example a key stored in external hardware. */
+/* RSA_FLAG_EXT_PKEY is deprecated and ignored. */
#define RSA_FLAG_EXT_PKEY 0x20
/* RSA_FLAG_SIGN_VER causes the |sign| and |verify| functions of |rsa_meth_st|
@@ -521,8 +519,8 @@ struct rsa_meth_st {
int (*private_transform)(RSA *rsa, uint8_t *out, const uint8_t *in,
size_t len);
- int (*mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa,
- BN_CTX *ctx); /* Can be null */
+ /* mod_exp is deprecated and ignored. Set it to NULL. */
+ int (*mod_exp)(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx);
/* bn_mod_exp is deprecated and ignored. Set it to NULL. */
int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,