static int RADIX_PROCESS_init(RADIX_PROCESS *rp, size_t node_idx, size_t process_idx)
{
+#if defined(OPENSSL_THREADS)
if (!TEST_ptr(rp->gm = ossl_crypto_mutex_new()))
goto err;
+#endif
if (!TEST_ptr(rp->objs = lh_RADIX_OBJ_new(RADIX_OBJ_hash, RADIX_OBJ_cmp)))
goto err;
BIO_printf(bio, " Threads (incl. main): %zu\n",
rp->next_thread_idx);
- BIO_printf(bio, " Time slip: %zu ms\n",
- ossl_time2ms(rp->time_slip));
+ BIO_printf(bio, " Time slip: %llu ms\n",
+ (unsigned long long)ossl_time2ms(rp->time_slip));
BIO_printf(bio, " Objects:\n");
lh_RADIX_OBJ_doall_arg(rp->objs, report_obj, bio);
rt->rp = rp;
+#if defined(OPENSSL_THREADS)
if (!TEST_ptr(rt->m = ossl_crypto_mutex_new())) {
OPENSSL_free(rt);
return 0;
}
+#endif
if (!TEST_true(sk_RADIX_THREAD_push(rp->threads, rt))) {
OPENSSL_free(rt);
#define S_UNI_ID(ordinal) \
(((ordinal) << 2) | QUIC_STREAM_INITIATOR_SERVER | QUIC_STREAM_DIR_UNI)
+#if defined(OPENSSL_THREADS)
+
static int RADIX_THREAD_worker_run(RADIX_THREAD *rt)
{
int ok = 0;
return 1;
}
+#endif
+
static void radix_activate_obj(RADIX_OBJ *obj)
{
if (obj != NULL)
-#include <netinet/in.h>
+#include "internal/sockets.h"
static const unsigned char alpn_ossltest[] = {
/* "\x08ossltest" (hex for EBCDIC resilience) */
int fd = -1;
BIO_ADDR *addr = NULL;
union BIO_sock_info_u info;
- struct in_addr ina = { htonl(INADDR_LOOPBACK) };
+ struct in_addr ina;
+
+ ina.s_addr = htonl(INADDR_LOOPBACK);
fd = BIO_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, 0);
if (!TEST_int_ge(fd, 0))
F_POP(mode);
REQUIRE_SSL(ssl);
- if (!TEST_true(SSL_set_default_stream_mode(ssl, mode)))
+ if (!TEST_true(SSL_set_default_stream_mode(ssl, (uint32_t)mode)))
goto err;
ok = 1;
F_POP(policy);
REQUIRE_SSL(ssl);
- if (!TEST_true(SSL_set_incoming_stream_policy(ssl, policy, error_code)))
+ if (!TEST_true(SSL_set_incoming_stream_policy(ssl, (int)policy, error_code)))
goto err;
ok = 1;
int ok = 0, r;
SSL *ssl;
const void *buf;
- uint64_t buf_len, bytes_read = 0;
+ size_t buf_len, bytes_read = 0;
F_POP2(buf, buf_len);
REQUIRE_SSL(ssl);
if (!TEST_true(SSL_set_blocking_mode(ssl, 0)))
return 0;
- SSL_CONN_CLOSE_INFO cc_info = {0};
- if (!TEST_false(SSL_get_conn_close_info(ssl, &cc_info, sizeof(cc_info))))
- goto err;
-
/* 0 is the success case for SSL_set_alpn_protos(). */
if (!TEST_false(SSL_set_alpn_protos(ssl, alpn_ossltest,
sizeof(alpn_ossltest))))
if (!SSL_get_conn_close_info(ssl, &cc_info, sizeof(cc_info)))
F_SPIN_AGAIN();
- if (!TEST_int_eq(expect_app,
+ if (!TEST_int_eq((int)expect_app,
(cc_info.flags & SSL_CONN_CLOSE_FLAG_TRANSPORT) == 0)
- || !TEST_int_eq(expect_remote,
+ || !TEST_int_eq((int)expect_remote,
(cc_info.flags & SSL_CONN_CLOSE_FLAG_LOCAL) == 0)
|| !TEST_uint64_t_eq(error_code, cc_info.error_code)) {
TEST_info("connection close reason: %s", cc_info.reason);
uint64_t lib, reason;
F_POP2(lib, reason);
- if (!TEST_size_t_eq((size_t)ERR_GET_LIB(ERR_peek_last_error()), lib)
- || !TEST_size_t_eq((size_t)ERR_GET_REASON(ERR_peek_last_error()), reason))
+ if (!TEST_size_t_eq((size_t)ERR_GET_LIB(ERR_peek_last_error()),
+ (size_t)lib)
+ || !TEST_size_t_eq((size_t)ERR_GET_REASON(ERR_peek_last_error()),
+ (size_t)reason))
goto err;
ok = 1;
F_POP(expected);
REQUIRE_SSL(ssl);
- if (!TEST_size_t_eq((size_t)SSL_get_error(ssl, 0), expected)
+ if (!TEST_size_t_eq((size_t)SSL_get_error(ssl, 0), (size_t)expected)
|| !TEST_int_eq(SSL_want(ssl), SSL_NOTHING))
goto err;
GET_OPERAND(srdr, v);
PRINT_OPC(PUSH_U64);
- BIO_printf(bio, "%#20llx (%lld)",
+ BIO_printf(bio, "%#20llx (%llu)",
(unsigned long long)v, (unsigned long long)v);
}
break;
GET_OPERAND(srdr, v);
PRINT_OPC(PUSH_SIZE);
- BIO_printf(bio, "%#20llx (%lld)",
+ BIO_printf(bio, "%#20llx (%llu)",
(unsigned long long)v, (unsigned long long)v);
}
break;
static ossl_inline int TERP_stk_pop(TERP *terp,
void *buf, size_t buf_len)
{
- if (!TEST_size_t_ge(terp->stk_end - terp->stk_cur, buf_len)) {
- asm("int3");
+ if (!TEST_size_t_ge(terp->stk_end - terp->stk_cur, buf_len))
return 0;
- }
memcpy(buf, terp->stk_cur, buf_len);
terp->stk_cur += buf_len;
break;
case OPK_PUSH_SIZE:
{
- uint64_t v;
+ size_t v;
TERP_GET_OPERAND(v);
TERP_STK_PUSH(terp, v);