]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/ec/ecp_mont.c
Make the EC code available from inside the FIPS provider
[thirdparty/openssl.git] / crypto / ec / ecp_mont.c
index 1654d595138cf3d4ed51fbbd2e9e65069f2adbc9..308b30629d53fce7752b2eeeb9476873e8be6d31 100644 (file)
@@ -146,7 +146,7 @@ int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p,
     group->field_data2 = NULL;
 
     if (ctx == NULL) {
-        ctx = new_ctx = BN_CTX_new();
+        ctx = new_ctx = BN_CTX_new_ex(group->libctx);
         if (ctx == NULL)
             return 0;
     }
@@ -222,7 +222,8 @@ int ec_GFp_mont_field_inv(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
     if (group->field_data1 == NULL)
         return 0;
 
-    if (ctx == NULL && (ctx = new_ctx = BN_CTX_secure_new()) == NULL)
+    if (ctx == NULL
+            && (ctx = new_ctx = BN_CTX_secure_new_ex(group->libctx)) == NULL)
         return 0;
 
     BN_CTX_start(ctx);