]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: check credentials in nts_ke_session test
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Aug 2025 08:20:18 +0000 (10:20 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 26 Aug 2025 10:33:14 +0000 (12:33 +0200)
Make it more clear when the test fails because the credentials could not
be created.

test/unit/nts_ke_session.c

index d10a57d08bb8d3bd8d4c31128ba12c27b5a92e36..7e6d957d57dc99a33784306bb0857217851244b3 100644 (file)
@@ -193,6 +193,8 @@ test_unit(void)
 
     server_cred = NKSN_CreateServerCertCredentials(&cert, &key, 1);
     client_cred = NKSN_CreateClientCertCredentials(&cert, &cert_id, 1, 0);
+    TEST_CHECK(server_cred);
+    TEST_CHECK(client_cred);
 
     TEST_CHECK(socketpair(AF_UNIX, SOCK_STREAM, 0, sock_fds) == 0);
     TEST_CHECK(fcntl(sock_fds[0], F_SETFL, O_NONBLOCK) == 0);