Home
last modified time | relevance | path

Searched refs:bn2 (Results 1 – 7 of 7) sorted by relevance

/freebsd/crypto/openssh/regress/unittests/sshbuf/
H A Dtest_sshbuf_getput_crypto.c35 BIGNUM *bn, *bn2; in sshbuf_getput_crypto_tests() local
136 bn2 = NULL; in sshbuf_getput_crypto_tests()
137 ASSERT_INT_EQ(sshbuf_get_bignum2(p1, &bn2), 0); in sshbuf_getput_crypto_tests()
138 ASSERT_BIGNUM_EQ(bn, bn2); in sshbuf_getput_crypto_tests()
141 BN_free(bn2); in sshbuf_getput_crypto_tests()
151 bn2 = NULL; in sshbuf_getput_crypto_tests()
152 r = sshbuf_get_bignum2(p1, &bn2); in sshbuf_getput_crypto_tests()
156 BN_free(bn2); in sshbuf_getput_crypto_tests()
166 bn2 = NULL; in sshbuf_getput_crypto_tests()
167 r = sshbuf_get_bignum2(p1, &bn2); in sshbuf_getput_crypto_tests()
[all …]
H A Dtest_sshbuf_getput_basic.c38 u_char bn2[] = { 0x00, 0x00, 0x01, 0x02 }; in sshbuf_getput_basic_tests() local
449 ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn2+2, sizeof(bn2)-2), 0); in sshbuf_getput_basic_tests()
458 ASSERT_INT_EQ(sshbuf_put_bignum2_bytes(p1, bn2, sizeof(bn2)), 0); in sshbuf_getput_basic_tests()
/freebsd/crypto/openssl/test/
H A Dkeymgmt_internal_test.c147 BIGNUM *bn1 = NULL, *bn2 = NULL, *bn3 = NULL; in test_pass_rsa() local
184 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa()
185 || !TEST_true(BN_set_word(bn2, expected[E])) in test_pass_rsa()
188 || !TEST_true(RSA_set0_key(rsa, bn1, bn2, bn3))) in test_pass_rsa()
193 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa()
194 || !TEST_true(BN_set_word(bn2, expected[Q])) in test_pass_rsa()
195 || !TEST_true(RSA_set0_factors(rsa, bn1, bn2))) in test_pass_rsa()
200 || !TEST_ptr(bn2 = BN_new()) in test_pass_rsa()
201 || !TEST_true(BN_set_word(bn2, expected[DQ])) in test_pass_rsa()
204 || !TEST_true(RSA_set0_crt_params(rsa, bn1, bn2, bn3))) in test_pass_rsa()
[all …]
H A Dbntest.c1981 BIGNUM *bn = NULL, *bn2 = NULL; in test_bn2signed() local
2000 if (!TEST_ptr(bn2 = BN_signed_bin2bn(scratch, sizeof(scratch), NULL)) in test_bn2signed()
2001 || !TEST_BN_eq(bn, bn2)) in test_bn2signed()
2004 BN_free(bn2); in test_bn2signed()
2005 bn2 = NULL; in test_bn2signed()
2008 if (!TEST_ptr(bn2 = BN_signed_lebin2bn(reversed, sizeof(reversed), NULL)) in test_bn2signed()
2009 || !TEST_BN_eq(bn, bn2)) in test_bn2signed()
2012 BN_free(bn2); in test_bn2signed()
2013 bn2 = NULL; in test_bn2signed()
2027 if (!TEST_ptr(bn2 = BN_signed_lebin2bn(scratch, sizeof(scratch), NULL)) in test_bn2signed()
[all …]
H A Dparams_api_test.c621 BIGNUM *bn = NULL, *bn2 = NULL; in test_param_construct() local
755 if (!TEST_true(OSSL_PARAM_get_BN(cp, &bn2)) in test_param_construct()
756 || !TEST_BN_eq(bn, bn2)) in test_param_construct()
765 BN_free(bn2); in test_param_construct()
/freebsd/crypto/openssl/test/testutil/
H A Dformat_output.c269 const BIGNUM *bn1, const BIGNUM *bn2) in test_fail_bignum_common() argument
282 l2 = bn2 == NULL ? 0 : (BN_num_bytes(bn2) + (BN_is_negative(bn2) ? 1 : 0)); in test_fail_bignum_common()
284 if ((bn1 == NULL) == (bn2 == NULL)) { in test_fail_bignum_common()
291 test_bignum_zero_print(bn2, '+'); in test_fail_bignum_common()
296 if (l1 != l2 || bn1 == NULL || bn2 == NULL || BN_cmp(bn1, bn2) != 0) in test_fail_bignum_common()
312 if (bn2 != NULL) { in test_fail_bignum_common()
314 BN_bn2binpad(bn2, m2, len); in test_fail_bignum_common()
320 n2 = convert_bn_memory(m2, bytes, b2, &lz2, bn2); in test_fail_bignum_common()
341 if (cnt == 0 && bn2 == NULL) in test_fail_bignum_common()
346 && bn1 != NULL && bn2 != NULL) in test_fail_bignum_common()
[all …]
H A Dtu_local.h36 const BIGNUM *bn1, const BIGNUM *bn2);