mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix TLS context tests with expired certs
commit 5283ea9b1d8a4b0f2fd6796bf60615aca7b6c3e6 changed the semantics of the 'expire_offset' field in the test case struct so that instead of being an absolute timestamp, it was a delta relative to the current time. This broke the test cases which were testing expiry of certificates, by putting the expiry time into the future, instead of in the past. Fix this by changing the expiry values to be negative, so that the delta goes into the past again. * virnettlscontexttest.c: Fix expiry tests
This commit is contained in:
parent
2a667c34cb
commit
567b8d69b9
@ -1112,7 +1112,7 @@ mymain(void)
|
||||
true, true, true,
|
||||
true, true, GNUTLS_KEY_KEY_CERT_SIGN,
|
||||
false, false, NULL, NULL,
|
||||
0, 1,
|
||||
0, -1,
|
||||
};
|
||||
static struct testTLSCertReq servercertexpreq = {
|
||||
NULL, NULL, "servercert.pem", "UK",
|
||||
@ -1120,7 +1120,7 @@ mymain(void)
|
||||
true, true, false,
|
||||
true, true, GNUTLS_KEY_DIGITAL_SIGNATURE | GNUTLS_KEY_KEY_ENCIPHERMENT,
|
||||
true, true, GNUTLS_KP_TLS_WWW_SERVER, NULL,
|
||||
0, 1,
|
||||
0, -1,
|
||||
};
|
||||
static struct testTLSCertReq clientcertexpreq = {
|
||||
NULL, NULL, "clientcert.pem", "UK",
|
||||
@ -1128,7 +1128,7 @@ mymain(void)
|
||||
true, true, false,
|
||||
true, true, GNUTLS_KEY_DIGITAL_SIGNATURE | GNUTLS_KEY_KEY_ENCIPHERMENT,
|
||||
true, true, GNUTLS_KP_TLS_WWW_CLIENT, NULL,
|
||||
0, 1,
|
||||
0, -1,
|
||||
};
|
||||
|
||||
DO_CTX_TEST(true, cacertexpreq, servercertreq, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user