/netbsd-src/crypto/external/bsd/openssl/dist/test/ |
H A D | wpackettest.c | 44 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_init() 45 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() 49 || !TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_init() 56 || !TEST_true(WPACKET_get_total_written(&pkt, &written)) in test_WPACKET_init() 61 if (!TEST_true(WPACKET_init_len(&pkt, buf, 1)) in test_WPACKET_init() 62 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() 63 || !TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_init() 64 || !TEST_true(WPACKET_get_total_written(&pkt, &written)) in test_WPACKET_init() 69 if (!TEST_true(WPACKET_init_len(&pkt, buf, 4)) in test_WPACKET_init() 70 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() [all …]
|
H A D | rsa_sp800_56b_test.c | 115 && TEST_true(BN_set_word(e, 1)) in test_check_public_exponent() 118 && TEST_true(BN_set_word(e, 65536)) in test_check_public_exponent() 121 && TEST_true(BN_set_word(e, 3)) in test_check_public_exponent() 122 && TEST_true(ossl_rsa_check_public_exponent(e)) in test_check_public_exponent() 123 && TEST_true(BN_set_word(e, 17)) in test_check_public_exponent() 124 && TEST_true(ossl_rsa_check_public_exponent(e)) in test_check_public_exponent() 125 && TEST_true(BN_set_word(e, 65537)) in test_check_public_exponent() 126 && TEST_true(ossl_rsa_check_public_exponent(e)) in test_check_public_exponent() 128 && TEST_true(BN_lshift(e, BN_value_one(), 256)) in test_check_public_exponent() 129 && TEST_true(BN_add(e, e, BN_value_one())) in test_check_public_exponent() [all …]
|
H A D | packettest.c | 21 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN)) in test_PACKET_remaining() 23 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 1)) in test_PACKET_remaining() 25 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_remaining() 36 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN)) in test_PACKET_end() 39 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 1)) in test_PACKET_end() 41 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_end() 53 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN)) in test_PACKET_get_1() 54 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() 56 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 2)) in test_PACKET_get_1() 57 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() [all …]
|
H A D | ectest.c | 58 if (!TEST_true(EC_GROUP_get_order(group, order, ctx)) in group_order_tests() 59 || !TEST_true(EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) in group_order_tests() 60 || !TEST_true(EC_POINT_is_at_infinity(group, Q)) in group_order_tests() 62 || !TEST_true(EC_GROUP_precompute_mult(group, ctx)) in group_order_tests() 64 || !TEST_true(EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) in group_order_tests() 65 || !TEST_true(EC_POINT_is_at_infinity(group, Q)) in group_order_tests() 66 || !TEST_true(EC_POINT_copy(P, G)) in group_order_tests() 67 || !TEST_true(BN_one(n1)) in group_order_tests() 68 || !TEST_true(EC_POINT_mul(group, Q, n1, NULL, NULL, ctx)) in group_order_tests() 70 || !TEST_true(BN_sub(n1, order, n1)) in group_order_tests() [all …]
|
H A D | bntest.c | 158 if (!(TEST_true(BN_bntest_rand(a, 1024, 1, 0)) in test_swap() 159 && TEST_true(BN_bntest_rand(b, 1024, 1, 0)) in test_swap() 191 || !TEST_true(BN_get_flags(b, BN_FLG_CONSTTIME)) in test_swap() 199 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap() 207 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap() 232 if (!(TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_sub() 235 && TEST_true(BN_add_word(b, i))) in test_sub() 238 if (!TEST_true(BN_bntest_rand(b, 400 + i - NUM1, 0, 0))) in test_sub() 243 if (!(TEST_true(BN_sub(c, a, b)) in test_sub() 244 && TEST_true(BN_add(c, c, b)) in test_sub() [all …]
|
H A D | param_build_test.c | 28 || !TEST_true(OSSL_PARAM_BLD_push_BN(bld, "zeronumber", zbn)) in template_public_single_zero_test() 37 || !TEST_true(OSSL_PARAM_get_BN(p, &zbn_res)) in template_public_single_zero_test() 60 || !TEST_true(OSSL_PARAM_BLD_push_BN(bld, "zeronumber", zbn)) in template_private_single_zero_test() 67 || !TEST_true(CRYPTO_secure_allocated(p->data)) in template_private_single_zero_test() 70 || !TEST_true(OSSL_PARAM_get_BN(p, &zbn_res)) in template_private_single_zero_test() 102 || !TEST_true(OSSL_PARAM_BLD_push_long(bld, "l", 42)) in template_public_test() 103 || !TEST_true(OSSL_PARAM_BLD_push_int32(bld, "i32", 1532)) in template_public_test() 104 || !TEST_true(OSSL_PARAM_BLD_push_int64(bld, "i64", -9999999)) in template_public_test() 105 || !TEST_true(OSSL_PARAM_BLD_push_time_t(bld, "t", 11224)) in template_public_test() 106 || !TEST_true(OSSL_PARAM_BLD_push_double(bld, "d", 1.61803398875)) in template_public_test() [all …]
|
H A D | siphash_internal_test.c | 198 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 199 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 202 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen)) in test_siphash() 207 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 208 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 212 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen))) in test_siphash() 224 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 225 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 229 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen))) in test_siphash() 238 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() [all …]
|
H A D | cmactest.c | 87 || !TEST_true(CMAC_Init(ctx, NULL, 0, EVP_aes_128_cbc(), NULL)) in test_cmac_bad() 91 || !TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, NULL, NULL)) in test_cmac_bad() 93 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_bad() 116 if (!TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, in test_cmac_run() 118 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_run() 119 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 126 if (!TEST_true(CMAC_Init(ctx, test[1].key, test[1].key_len, in test_cmac_run() 128 || !TEST_true(CMAC_Update(ctx, test[1].data, test[1].data_len)) in test_cmac_run() 129 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 136 if (!TEST_true(CMAC_Init(ctx, test[2].key, test[2].key_len, NULL, NULL)) in test_cmac_run() [all …]
|
H A D | exptest.c | 65 if (!TEST_true(BN_rand(a, 1024, BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY))) in test_mod_exp_zero() 68 if (!TEST_true(BN_mod_exp(r, a, p, m, ctx))) in test_mod_exp_zero() 71 if (!TEST_true(a_is_zero_mod_one("BN_mod_exp", r, a))) in test_mod_exp_zero() 74 if (!TEST_true(BN_mod_exp_recp(r, a, p, m, ctx))) in test_mod_exp_zero() 77 if (!TEST_true(a_is_zero_mod_one("BN_mod_exp_recp", r, a))) in test_mod_exp_zero() 80 if (!TEST_true(BN_mod_exp_simple(r, a, p, m, ctx))) in test_mod_exp_zero() 83 if (!TEST_true(a_is_zero_mod_one("BN_mod_exp_simple", r, a))) in test_mod_exp_zero() 86 if (!TEST_true(BN_mod_exp_mont(r, a, p, m, ctx, NULL))) in test_mod_exp_zero() 89 if (!TEST_true(a_is_zero_mod_one("BN_mod_exp_mont", r, a))) in test_mod_exp_zero() 92 if (!TEST_true(BN_mod_exp_mont_consttime(r, a, p, m, ctx, NULL))) in test_mod_exp_zero() [all …]
|
H A D | dtlstest.c | 80 if (!TEST_true(create_ssl_ctx_pair(NULL, DTLS_server_method(), in test_dtls_unprocessed() 87 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "AES128-SHA"))) in test_dtls_unprocessed() 91 if (!TEST_true(SSL_CTX_set_cipher_list(sctx, "AES128-SHA:@SECLEVEL=0")) in test_dtls_unprocessed() 92 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_unprocessed() 102 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl1, &clientssl1, in test_dtls_unprocessed() 127 if (!TEST_true(create_bare_ssl_connection(serverssl1, clientssl1, in test_dtls_unprocessed() 202 if (!TEST_true(create_ssl_ctx_pair(NULL, DTLS_server_method(), in test_dtls_drop_records() 210 if (!TEST_true(SSL_CTX_set_cipher_list(sctx, "DEFAULT:@SECLEVEL=0")) in test_dtls_drop_records() 211 || !TEST_true(SSL_CTX_set_cipher_list(cctx, in test_dtls_drop_records() 216 if (!TEST_true(SSL_CTX_set_dh_auto(sctx, 1))) in test_dtls_drop_records() [all …]
|
H A D | ffc_internal_test.c | 209 if (!TEST_true(ossl_ffc_params_FIPS186_4_validate(NULL, ¶ms, in ffc_params_validate_g_unverified_test() 277 if (!TEST_true(ossl_ffc_params_FIPS186_4_validate(NULL, ¶ms, in ffc_params_validate_pq_test() 352 if (!TEST_true(ossl_ffc_params_FIPS186_4_generate(NULL, ¶ms, in ffc_params_gen_test() 356 if (!TEST_true(ossl_ffc_params_FIPS186_4_validate(NULL, ¶ms, in ffc_params_gen_test() 374 if (!TEST_true(ossl_ffc_params_FIPS186_4_generate(NULL, ¶ms, in ffc_params_gen_canonicalg_test() 378 if (!TEST_true(ossl_ffc_params_FIPS186_4_validate(NULL, ¶ms, in ffc_params_gen_canonicalg_test() 383 if (!TEST_true(ossl_ffc_params_print(bio_out, ¶ms, 4))) in ffc_params_gen_canonicalg_test() 401 if (!TEST_true(ossl_ffc_params_FIPS186_2_generate(NULL, ¶ms, in ffc_params_fips186_2_gen_validate_test() 405 if (!TEST_true(ossl_ffc_params_FIPS186_2_validate(NULL, ¶ms, in ffc_params_fips186_2_gen_validate_test() 419 if (!TEST_true(res == FFC_CHECK_Q_MISMATCH || res == FFC_CHECK_Q_NOT_PRIME)) in ffc_params_fips186_2_gen_validate_test() [all …]
|
H A D | params_api_test.c | 86 if ((bit32 && !TEST_true(OSSL_PARAM_get_int32(param, &i32))) in test_param_type_extra() 87 || !TEST_true(OSSL_PARAM_get_int64(param, &i64))) in test_param_type_extra() 91 && !TEST_true(OSSL_PARAM_get_uint32(param, (uint32_t *)&i32))) in test_param_type_extra() 92 || !TEST_true(OSSL_PARAM_get_uint64(param, (uint64_t *)&i64)) in test_param_type_extra() 93 || (sizet && !TEST_true(OSSL_PARAM_get_size_t(param, &s)))) in test_param_type_extra() 120 if (!TEST_true(OSSL_PARAM_set_int32(param, 12345)) in test_param_type_extra() 121 || !TEST_true(OSSL_PARAM_get_int64(param, &i64)) in test_param_type_extra() 125 if (!TEST_true(OSSL_PARAM_set_uint32(param, 12345)) in test_param_type_extra() 126 || !TEST_true(OSSL_PARAM_get_uint64(param, (uint64_t *)&i64)) in test_param_type_extra() 130 if (!TEST_true(OSSL_PARAM_modified(param))) in test_param_type_extra() [all …]
|
H A D | threadstest.c | 42 res = TEST_true(CRYPTO_THREAD_read_lock(lock)) in test_lock() 43 && TEST_true(CRYPTO_THREAD_unlock(lock)) in test_lock() 44 && TEST_true(CRYPTO_THREAD_write_lock(lock)) in test_lock() 45 && TEST_true(CRYPTO_THREAD_unlock(lock)); in test_lock() 69 if (!TEST_true(run_thread(&thread, once_run_thread_cb)) in test_once() 70 || !TEST_true(wait_for_thread(thread)) in test_once() 99 || !TEST_true(CRYPTO_THREAD_set_local(&thread_local_key, in thread_local_thread_cb() 115 if (!TEST_true(CRYPTO_THREAD_init_local(&thread_local_key, in test_thread_local() 121 || !TEST_true(run_thread(&thread, thread_local_thread_cb)) in test_thread_local() 122 || !TEST_true(wait_for_thread(thread)) in test_thread_local() [all …]
|
/netbsd-src/crypto/external/bsd/openssl.old/dist/test/ |
H A D | wpackettest.c | 51 if (!TEST_true(WPACKET_init(&pkt, buf)) in test_WPACKET_init() 52 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() 56 || !TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_init() 63 || !TEST_true(WPACKET_get_total_written(&pkt, &written)) in test_WPACKET_init() 68 if (!TEST_true(WPACKET_init_len(&pkt, buf, 1)) in test_WPACKET_init() 69 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() 70 || !TEST_true(WPACKET_finish(&pkt)) in test_WPACKET_init() 71 || !TEST_true(WPACKET_get_total_written(&pkt, &written)) in test_WPACKET_init() 76 if (!TEST_true(WPACKET_init_len(&pkt, buf, 4)) in test_WPACKET_init() 77 || !TEST_true(WPACKET_put_bytes_u8(&pkt, 0xff)) in test_WPACKET_init() [all …]
|
H A D | packettest.c | 21 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, sizeof(smbuf))) in test_PACKET_remaining() 23 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 1)) in test_PACKET_remaining() 25 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_remaining() 36 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, sizeof(smbuf))) in test_PACKET_end() 39 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 1)) in test_PACKET_end() 41 || !TEST_true(PACKET_forward(&pkt, 1)) in test_PACKET_end() 53 if (!TEST_true(PACKET_buf_init(&pkt, smbuf, BUF_LEN)) in test_PACKET_get_1() 54 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() 56 || !TEST_true(PACKET_forward(&pkt, BUF_LEN - 2)) in test_PACKET_get_1() 57 || !TEST_true(PACKET_get_1(&pkt, &i)) in test_PACKET_get_1() [all …]
|
H A D | ectest.c | 49 if (!TEST_true(EC_GROUP_get_order(group, order, ctx)) in group_order_tests() 50 || !TEST_true(EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) in group_order_tests() 51 || !TEST_true(EC_POINT_is_at_infinity(group, Q)) in group_order_tests() 52 || !TEST_true(EC_GROUP_precompute_mult(group, ctx)) in group_order_tests() 53 || !TEST_true(EC_POINT_mul(group, Q, order, NULL, NULL, ctx)) in group_order_tests() 54 || !TEST_true(EC_POINT_is_at_infinity(group, Q)) in group_order_tests() 55 || !TEST_true(EC_POINT_copy(P, G)) in group_order_tests() 56 || !TEST_true(BN_one(n1)) in group_order_tests() 57 || !TEST_true(EC_POINT_mul(group, Q, n1, NULL, NULL, ctx)) in group_order_tests() 59 || !TEST_true(BN_sub(n1, order, n1)) in group_order_tests() [all …]
|
H A D | bntest.c | 162 if (!(TEST_true(BN_bntest_rand(a, 1024, 1, 0)) in test_swap() 163 && TEST_true(BN_bntest_rand(b, 1024, 1, 0)) in test_swap() 195 || !TEST_true(BN_get_flags(b, BN_FLG_CONSTTIME)) in test_swap() 203 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap() 211 || !TEST_true(BN_get_flags(a, BN_FLG_CONSTTIME)) in test_swap() 236 if (!(TEST_true(BN_bntest_rand(a, 512, 0, 0))) in test_sub() 239 && TEST_true(BN_add_word(b, i))) in test_sub() 242 if (!TEST_true(BN_bntest_rand(b, 400 + i - NUM1, 0, 0))) in test_sub() 247 if (!(TEST_true(BN_sub(c, a, b)) in test_sub() 248 && TEST_true(BN_add(c, c, b)) in test_sub() [all …]
|
H A D | sslapitest.c | 316 if (!TEST_true(create_ssl_ctx_pair(TLS_server_method(), in test_keylog() 327 if (!TEST_true(SSL_CTX_set_cipher_list(cctx, "RSA"))) in test_keylog() 330 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) == NULL) in test_keylog() 331 || !TEST_true(SSL_CTX_get_keylog_callback(sctx) == NULL)) in test_keylog() 334 if (!TEST_true(SSL_CTX_get_keylog_callback(cctx) in test_keylog() 338 if (!TEST_true(SSL_CTX_get_keylog_callback(sctx) in test_keylog() 343 if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, in test_keylog() 345 || !TEST_true(create_ssl_connection(serverssl, clientssl, in test_keylog() 360 if (!TEST_true(test_keylog_output(client_log_buffer, clientssl, in test_keylog() 365 if (!TEST_true(test_keylog_output(server_log_buffer, serverssl, in test_keylog() [all …]
|
H A D | evp_extra_test.c | 493 if (!TEST_true(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_IVLEN, t->ivlen, NULL))) in evp_init_seq_set_iv() 496 if (!TEST_true(EVP_CipherInit_ex(ctx, NULL, NULL, NULL, t->iv, -1))) in evp_init_seq_set_iv() 529 if (!TEST_true(EVP_CipherInit_ex(ctx, type, NULL, NULL, NULL, t->initenc))) { in test_evp_init_seq() 533 if (!TEST_true(EVP_CIPHER_CTX_set_padding(ctx, 0))) { in test_evp_init_seq() 537 if (t->keyfirst && !TEST_true(EVP_CipherInit_ex(ctx, NULL, NULL, t->key, NULL, -1))) { in test_evp_init_seq() 545 if (t->keyfirst == 0 && !TEST_true(EVP_CipherInit_ex(ctx, NULL, NULL, t->key, NULL, -1))) { in test_evp_init_seq() 549 if (!TEST_true(EVP_CipherInit_ex(ctx, NULL, NULL, NULL, NULL, t->finalenc))) { in test_evp_init_seq() 553 if (!TEST_true(EVP_CipherUpdate(ctx, outbuf, &outlen1, t->input, t->inlen))) { in test_evp_init_seq() 559 if (!TEST_true(EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, in test_evp_init_seq() 565 if (!TEST_true(EVP_CipherFinal_ex(ctx, outbuf + outlen1, &outlen2))) { in test_evp_init_seq() [all …]
|
H A D | ecdsatest.c | 43 if (!TEST_true(RAND_set_rand_method(&fake_rand))) in change_rand() 50 if (!TEST_true(RAND_set_rand_method(old_rand))) in restore_rand() 68 || !TEST_true(BN_hex2bn(&tmp, numbers[fbytes_counter])) in fbytes() 71 || !TEST_true(BN_bn2binpad(tmp, buf, num))) in fbytes() 124 || !TEST_true(EVP_DigestInit_ex(mctx, EVP_get_digestbynid(md_nid), NULL)) in x9_62_tests() 125 || !TEST_true(EVP_DigestUpdate(mctx, message, msg_len)) in x9_62_tests() 126 || !TEST_true(EVP_DigestFinal_ex(mctx, digest, &dgst_len)) in x9_62_tests() 132 || !TEST_true(BN_hex2bn(&r, r_in)) in x9_62_tests() 133 || !TEST_true(BN_hex2bn(&s, s_in)) in x9_62_tests() 135 || !TEST_true(change_rand())) in x9_62_tests() [all …]
|
H A D | siphash_internal_test.c | 199 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 200 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 203 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen)) in test_siphash() 208 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 209 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 213 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen))) in test_siphash() 225 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() 226 || !TEST_true(SipHash_Init(&siphash, key, 0, 0))) in test_siphash() 230 if (!TEST_true(SipHash_Final(&siphash, out, expectedlen))) in test_siphash() 239 if (!TEST_true(SipHash_set_hash_size(&siphash, expectedlen)) in test_siphash() [all …]
|
H A D | cmactest.c | 81 || !TEST_true(CMAC_Init(ctx, NULL, 0, EVP_aes_128_cbc(), NULL)) in test_cmac_bad() 85 || !TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, NULL, NULL)) in test_cmac_bad() 87 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_bad() 110 if (!TEST_true(CMAC_Init(ctx, test[0].key, test[0].key_len, in test_cmac_run() 112 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_run() 113 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 120 if (!TEST_true(CMAC_Init(ctx, test[1].key, test[1].key_len, in test_cmac_run() 122 || !TEST_true(CMAC_Update(ctx, test[1].data, test[1].data_len)) in test_cmac_run() 123 || !TEST_true(CMAC_Final(ctx, buf, &len))) in test_cmac_run() 130 if (!TEST_true(CMAC_Init(ctx, test[2].key, test[2].key_len, NULL, NULL)) in test_cmac_run() [all …]
|
H A D | sm2_internal_test.c | 65 if (!TEST_true(RAND_set_rand_method(&fake_rand))) in start_fake_rand() 75 if (!TEST_true(RAND_set_rand_method(saved_rand))) in restore_rand() 96 if (!TEST_true(BN_hex2bn(&p, p_hex)) in create_EC_group() 97 || !TEST_true(BN_hex2bn(&a, a_hex)) in create_EC_group() 98 || !TEST_true(BN_hex2bn(&b, b_hex))) in create_EC_group() 109 if (!TEST_true(BN_hex2bn(&g_x, x_hex)) in create_EC_group() 110 || !TEST_true(BN_hex2bn(&g_y, y_hex)) in create_EC_group() 111 || !TEST_true(EC_POINT_set_affine_coordinates(group, generator, g_x, in create_EC_group() 115 if (!TEST_true(BN_hex2bn(&order, order_hex)) in create_EC_group() 116 || !TEST_true(BN_hex2bn(&cof, cof_hex)) in create_EC_group() [all …]
|
H A D | clienthellotest.c | 87 if (!TEST_true(SSL_CTX_set_max_proto_version(ctx, TLS_MAX_VERSION))) in test_client_hello() 97 if (!TEST_true(SSL_CTX_set_max_proto_version(ctx, TLS1_2_VERSION))) in test_client_hello() 131 } else if (!TEST_true(SSL_CTX_set_cipher_list(ctx, in test_client_hello() 133 || !TEST_true(SSL_CTX_set_ciphersuites(ctx, in test_client_hello() 162 if (!TEST_true(SSL_SESSION_set_time(sess, (long)time(NULL))) in test_client_hello() 163 || !TEST_true(SSL_set_session(con, sess))) in test_client_hello() 179 if (!TEST_true(SSL_set_session_ticket_ext(con, dummytick, in test_client_hello() 190 if (!TEST_true(PACKET_buf_init(&pkt, data, len)) in test_client_hello() 198 if (!TEST_true(PACKET_forward(&pkt, SSL3_HM_HEADER_LENGTH)) in test_client_hello() 200 || !TEST_true(PACKET_forward(&pkt, CLIENT_VERSION_LEN in test_client_hello() [all …]
|
H A D | enginetest.c | 59 || !TEST_true(ENGINE_set_id(new_h1, "test_id0")) in test_engines() 60 || !TEST_true(ENGINE_set_name(new_h1, "First test item")) in test_engines() 62 || !TEST_true(ENGINE_set_id(new_h2, "test_id1")) in test_engines() 63 || !TEST_true(ENGINE_set_name(new_h2, "Second test item")) in test_engines() 65 || !TEST_true(ENGINE_set_id(new_h3, "test_id2")) in test_engines() 66 || !TEST_true(ENGINE_set_name(new_h3, "Third test item")) in test_engines() 68 || !TEST_true(ENGINE_set_id(new_h4, "test_id3")) in test_engines() 69 || !TEST_true(ENGINE_set_name(new_h4, "Fourth test item"))) in test_engines() 74 if (!TEST_true(ENGINE_add(new_h1))) in test_engines() 80 if (!TEST_true(ENGINE_remove(ptr))) in test_engines() [all …]
|