diff options
author | Matt Caswell <matt@openssl.org> | 2020-06-15 14:21:00 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-06-19 10:34:58 +0100 |
commit | 2da8d4eb2812e18cec5c8324a54a4c56b52563ed (patch) | |
tree | 83398242047d499554026412f2bd68a51fe7217b /crypto/ec/ec_local.h | |
parent | 48e971dd9f88933a7f77f5051a8b79b9e17892a9 (diff) |
Add more complete support for libctx/propq in the EC code
Renames some "new_ex" functions to "new_with_libctx" and ensures that we
pass around the libctx AND the propq everywhere.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12159)
Diffstat (limited to 'crypto/ec/ec_local.h')
-rw-r--r-- | crypto/ec/ec_local.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/ec/ec_local.h b/crypto/ec/ec_local.h index 7f9b61bc49..aa040b54d1 100644 --- a/crypto/ec/ec_local.h +++ b/crypto/ec/ec_local.h @@ -274,6 +274,7 @@ struct ec_group_st { } pre_comp; OPENSSL_CTX *libctx; + char *propq; }; #define SETPRECOMP(g, type, pre) \ @@ -297,6 +298,7 @@ struct ec_key_st { #endif CRYPTO_RWLOCK *lock; OPENSSL_CTX *libctx; + char *propq; /* Provider data */ size_t dirty_cnt; /* If any key material changes, increment this */ @@ -593,10 +595,12 @@ int ec_group_simple_order_bits(const EC_GROUP *group); * Creates a new EC_GROUP object * \param libctx The associated library context or NULL for the default * library context + * \param propq Any property query string * \param meth EC_METHOD to use * \return newly created EC_GROUP object or NULL in case of an error. */ -EC_GROUP *ec_group_new_ex(OPENSSL_CTX *libctx, const EC_METHOD *meth); +EC_GROUP *ec_group_new_with_libctx(OPENSSL_CTX *libctx, const char *propq, + const EC_METHOD *meth); #ifdef ECP_NISTZ256_ASM /** Returns GFp methods using montgomery multiplication, with x86-64 optimized @@ -651,7 +655,8 @@ struct ec_key_method_st { #define EC_KEY_METHOD_DYNAMIC 1 -EC_KEY *ec_key_new_method_int(OPENSSL_CTX *libctx, ENGINE *engine); +EC_KEY *ec_key_new_method_int(OPENSSL_CTX *libctx, const char *propq, + ENGINE *engine); int ossl_ec_key_gen(EC_KEY *eckey); int ossl_ecdh_compute_key(unsigned char **pout, size_t *poutlen, |