const unsigned char context[] = "context";
const unsigned char *emptycontext = NULL;
unsigned char longcontext[1280];
+ int test_longcontext = fips_provider_version_ge(libctx, 3, 3, 0);
unsigned char ckeymat1[80], ckeymat2[80], ckeymat3[80], ckeymat4[80];
unsigned char skeymat1[80], skeymat2[80], skeymat3[80], skeymat4[80];
size_t labellen;
sizeof(ckeymat3), label,
labellen,
NULL, 0, 0), 1)
- || !TEST_int_eq(SSL_export_keying_material(clientssl, ckeymat4,
- sizeof(ckeymat4), label,
- labellen,
- longcontext,
- sizeof(longcontext), 1),
- 1)
+ || (test_longcontext
+ && !TEST_int_eq(SSL_export_keying_material(clientssl,
+ ckeymat4,
+ sizeof(ckeymat4), label,
+ labellen,
+ longcontext,
+ sizeof(longcontext), 1),
+ 1))
|| !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat1,
sizeof(skeymat1), label,
labellen,
sizeof(skeymat3), label,
labellen,
NULL, 0, 0), 1)
- || !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat4,
- sizeof(skeymat4), label,
- labellen,
- longcontext,
- sizeof(longcontext), 1),
- 1)
+ || (test_longcontext
+ && !TEST_int_eq(SSL_export_keying_material(serverssl, skeymat4,
+ sizeof(skeymat4), label,
+ labellen,
+ longcontext,
+ sizeof(longcontext), 1),
+ 1))
/*
* Check that both sides created the same key material with the
* same context.
* Check that both sides created the same key material with a
* long context.
*/
- || !TEST_mem_eq(ckeymat4, sizeof(ckeymat4), skeymat4,
- sizeof(skeymat4))
+ || (test_longcontext
+ && !TEST_mem_eq(ckeymat4, sizeof(ckeymat4), skeymat4,
+ sizeof(skeymat4)))
/* Different contexts should produce different results */
|| !TEST_mem_ne(ckeymat1, sizeof(ckeymat1), ckeymat2,
sizeof(ckeymat2)))