Lines Matching defs:ctx
2834 mod_sqrt_test(struct mod_sqrt_test *test, BN_CTX *ctx)
2839 BN_CTX_start(ctx);
2841 if ((a = BN_CTX_get(ctx)) == NULL)
2843 if ((p = BN_CTX_get(ctx)) == NULL)
2845 if ((want = BN_CTX_get(ctx)) == NULL)
2847 if ((got = BN_CTX_get(ctx)) == NULL)
2849 if ((diff = BN_CTX_get(ctx)) == NULL)
2857 if (BN_mod_sqrt(got, a, p, ctx) == NULL) {
2867 if (!BN_mod_sub(diff, want, got, p, ctx))
2884 BN_CTX_end(ctx);
2892 BN_CTX *ctx;
2896 if ((ctx = BN_CTX_new()) == NULL)
2900 failed |= mod_sqrt_test(&mod_sqrt_test_data[i], ctx);
2902 BN_CTX_free(ctx);
4435 BN_CTX *ctx)
4442 BN_CTX_start(ctx);
4444 if ((a = BN_CTX_get(ctx)) == NULL)
4446 if ((p = BN_CTX_get(ctx)) == NULL)
4448 if ((want = BN_CTX_get(ctx)) == NULL)
4450 if ((got = BN_CTX_get(ctx)) == NULL)
4452 if ((diff = BN_CTX_get(ctx)) == NULL)
4462 if (BN_mod_sqrt(got, a, p, ctx) == NULL) {
4482 if (!BN_mod_sub(diff, want, got, p, ctx))
4498 BN_CTX_end(ctx);
4506 BN_CTX *ctx;
4510 if ((ctx = BN_CTX_new()) == NULL)
4516 failed |= bn_mod_sqrt_p_is_1_mod_8_test(test, ctx);
4519 BN_CTX_free(ctx);