Add more complete support for libctx/propq in the EC code
[openssl.git] / crypto / ec / ec_local.h
index 7f9b61bc492e2001130e851a669386416e69e11e..aa040b54d105994130ce695f7b58d789a191bb77 100644 (file)
@@ -274,6 +274,7 @@ struct ec_group_st {
     } pre_comp;
 
     OPENSSL_CTX *libctx;
     } pre_comp;
 
     OPENSSL_CTX *libctx;
+    char *propq;
 };
 
 #define SETPRECOMP(g, type, pre) \
 };
 
 #define SETPRECOMP(g, type, pre) \
@@ -297,6 +298,7 @@ struct ec_key_st {
 #endif
     CRYPTO_RWLOCK *lock;
     OPENSSL_CTX *libctx;
 #endif
     CRYPTO_RWLOCK *lock;
     OPENSSL_CTX *libctx;
+    char *propq;
 
     /* Provider data */
     size_t dirty_cnt; /* If any key material changes, increment this */
 
     /* 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
  *  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.
  */
  *  \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
 
 #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
 
 
 #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,
 
 int ossl_ec_key_gen(EC_KEY *eckey);
 int ossl_ecdh_compute_key(unsigned char **pout, size_t *poutlen,