ret = tls_buffer_extend(buf, et->extend_len, read_cb, &rs);
if (ret != extend_tests[i].want_ret) {
- fprintf(stderr, "FAIL: Test %zi - extend returned %zi, "
- "want %zi\n", i, ret, et->want_ret);
+ fprintf(stderr, "FAIL: Test %zd - extend returned %zd, "
+ "want %zd\n", i, ret, et->want_ret);
return 1;
}
tls_buffer_cbs(buf, &cbs);
if (!CBS_mem_equal(&cbs, testdata, CBS_len(&cbs))) {
- fprintf(stderr, "FAIL: Test %zi - extend buffer "
+ fprintf(stderr, "FAIL: Test %zd - extend buffer "
"mismatch", i);
return 1;
}
-/* $OpenBSD: clienttest.c,v 1.36 2021/11/20 16:32:55 tb Exp $ */
+/* $OpenBSD: clienttest.c,v 1.37 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
*
int ret = 1;
long len;
- fprintf(stderr, "Test %i - %s\n", testno, cht->desc);
+ fprintf(stderr, "Test %d - %s\n", testno, cht->desc);
/* Providing a small buf causes *_get_server_hello() to return. */
if ((rbio = BIO_new_mem_buf(rbuf, sizeof(rbuf))) == NULL) {
errx(1, "failed to make client hello");
if ((size_t)len != client_hello_len) {
- fprintf(stderr, "FAIL: test returned ClientHello length %li, "
+ fprintf(stderr, "FAIL: test returned ClientHello length %ld, "
"want %zu\n", len, client_hello_len);
fprintf(stderr, "received:\n");
hexdump(wbuf, len, NULL);
-/* $OpenBSD: recordtest.c,v 1.4 2020/05/11 18:08:37 jsing Exp $ */
+/* $OpenBSD: recordtest.c,v 1.5 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
*
ret = tls13_record_recv(rec, read_cb, &rs);
if (ret != rrt->rt[i].want_ret) {
fprintf(stderr, "FAIL: Test %zu/%zu - tls_record_recv "
- "returned %zi, want %zi\n", test_no, i, ret,
+ "returned %zd, want %zd\n", test_no, i, ret,
rrt->rt[i].want_ret);
goto failure;
}
ret = tls13_record_send(rec, write_cb, &ws);
if (ret != rst->rt[i].want_ret) {
fprintf(stderr, "FAIL: Test %zu/%zu - tls_record_send "
- "returned %zi, want %zi\n", test_no, i, ret,
+ "returned %zd, want %zd\n", test_no, i, ret,
rst->rt[i].want_ret);
goto failure;
}
-/* $OpenBSD: record_layer_test.c,v 1.4 2021/03/29 16:22:02 jsing Exp $ */
+/* $OpenBSD: record_layer_test.c,v 1.5 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
*
memcpy(seq_num, snt->seq_num, sizeof(seq_num));
if ((ret = tls12_record_layer_inc_seq_num(rl, seq_num)) != snt->want) {
- fprintf(stderr, "FAIL: Test %zu - got return %i, want %i\n",
+ fprintf(stderr, "FAIL: Test %zu - got return %d, want %d\n",
test_no, ret, snt->want);
goto failure;
}
memcpy(seq_num, snt->seq_num, sizeof(seq_num));
if ((ret = tls13_record_layer_inc_seq_num(seq_num)) != snt->want) {
- fprintf(stderr, "FAIL: Test %zu - got return %i, want %i\n",
+ fprintf(stderr, "FAIL: Test %zu - got return %d, want %d\n",
test_no, ret, snt->want);
goto failure;
}
-/* $OpenBSD: servertest.c,v 1.6 2021/11/20 16:36:55 tb Exp $ */
+/* $OpenBSD: servertest.c,v 1.7 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Joel Sing <jsing@openbsd.org>
*
SSL *ssl = NULL;
int ret = 1;
- fprintf(stderr, "Test %i - %s\n", testno, sht->desc);
+ fprintf(stderr, "Test %d - %s\n", testno, sht->desc);
if ((rbio = BIO_new_mem_buf(sht->client_hello,
sht->client_hello_len)) == NULL) {
-/* $OpenBSD: tlslegacytest.c,v 1.5 2021/11/20 16:36:55 tb Exp $ */
+/* $OpenBSD: tlslegacytest.c,v 1.6 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017, 2020 Joel Sing <jsing@openbsd.org>
*
SSL *ssl = NULL;
int ret = 1;
- fprintf(stderr, "Test %i - %s\n", testno, tct->desc);
+ fprintf(stderr, "Test %d - %s\n", testno, tct->desc);
if ((rbio = BIO_new_mem_buf(tct->server_response,
tct->server_response_len)) == NULL) {
-/* $OpenBSD: tls_prf.c,v 1.6 2022/02/06 09:19:46 anton Exp $ */
+/* $OpenBSD: tls_prf.c,v 1.7 2022/06/10 22:00:15 tb Exp $ */
/*
* Copyright (c) 2017 Joel Sing <jsing@openbsd.org>
*
int failure = 1;
int len;
- fprintf(stderr, "Test %i - %s\n", test_no, tpt->desc);
+ fprintf(stderr, "Test %d - %s\n", test_no, tpt->desc);
if ((out = malloc(TLS_PRF_OUT_LEN)) == NULL)
errx(1, "failed to allocate out");
sizeof(TLS_PRF_SEED2), TLS_PRF_SEED3, sizeof(TLS_PRF_SEED3),
TLS_PRF_SEED4, sizeof(TLS_PRF_SEED4), TLS_PRF_SEED5,
sizeof(TLS_PRF_SEED5), out, len) != 1) {
- fprintf(stderr, "FAIL: tls_PRF failed for len %i\n",
+ fprintf(stderr, "FAIL: tls_PRF failed for len %d\n",
len);
goto failure;
}
if (memcmp(out, tpt->out, len) != 0) {
fprintf(stderr, "FAIL: tls_PRF output differs for "
- "len %i\n", len);
+ "len %d\n", len);
fprintf(stderr, "output:\n");
hexdump(out, TLS_PRF_OUT_LEN);
fprintf(stderr, "test data:\n");