Lines Matching refs:bnctx
265 BN_CTX *bnctx; in key_equal_public() local
295 if ((bnctx = BN_CTX_new()) == NULL) in key_equal_public()
298 EC_KEY_get0_group(b->ecdsa), bnctx) != 0 || in key_equal_public()
301 EC_KEY_get0_public_key(b->ecdsa), bnctx) != 0) { in key_equal_public()
302 BN_CTX_free(bnctx); in key_equal_public()
305 BN_CTX_free(bnctx); in key_equal_public()
1076 BN_CTX *bnctx; in key_ecdsa_key_to_nid() local
1089 if ((bnctx = BN_CTX_new()) == NULL) in key_ecdsa_key_to_nid()
1095 if (EC_GROUP_cmp(g, eg, bnctx) == 0) in key_ecdsa_key_to_nid()
1099 BN_CTX_free(bnctx); in key_ecdsa_key_to_nid()
2108 BN_CTX *bnctx; in key_ec_validate_public() local
2113 if ((bnctx = BN_CTX_new()) == NULL) in key_ec_validate_public()
2115 BN_CTX_start(bnctx); in key_ec_validate_public()
2134 if ((x = BN_CTX_get(bnctx)) == NULL || in key_ec_validate_public()
2135 (y = BN_CTX_get(bnctx)) == NULL || in key_ec_validate_public()
2136 (order = BN_CTX_get(bnctx)) == NULL || in key_ec_validate_public()
2137 (tmp = BN_CTX_get(bnctx)) == NULL) in key_ec_validate_public()
2141 if (EC_GROUP_get_order(group, order, bnctx) != 1) in key_ec_validate_public()
2144 x, y, bnctx) != 1) in key_ec_validate_public()
2162 if (EC_POINT_mul(group, nq, NULL, public, order, bnctx) != 1) in key_ec_validate_public()
2185 BN_CTX_free(bnctx); in key_ec_validate_public()
2193 BN_CTX *bnctx; in key_ec_validate_private() local
2197 if ((bnctx = BN_CTX_new()) == NULL) in key_ec_validate_private()
2199 BN_CTX_start(bnctx); in key_ec_validate_private()
2201 if ((order = BN_CTX_get(bnctx)) == NULL || in key_ec_validate_private()
2202 (tmp = BN_CTX_get(bnctx)) == NULL) in key_ec_validate_private()
2206 if (EC_GROUP_get_order(EC_KEY_get0_group(key), order, bnctx) != 1) in key_ec_validate_private()
2226 BN_CTX_free(bnctx); in key_ec_validate_private()
2235 BN_CTX *bnctx; in key_dump_ec_point() local
2241 if ((bnctx = BN_CTX_new()) == NULL) in key_dump_ec_point()
2243 BN_CTX_start(bnctx); in key_dump_ec_point()
2244 if ((x = BN_CTX_get(bnctx)) == NULL || (y = BN_CTX_get(bnctx)) == NULL) in key_dump_ec_point()
2249 if (EC_POINT_get_affine_coordinates_GFp(group, point, x, y, bnctx) != 1) in key_dump_ec_point()
2256 BN_CTX_free(bnctx); in key_dump_ec_point()