diff --git a/cmd/interop/src/main.cpp b/cmd/interop/src/main.cpp index 4864c982..7038cf51 100644 --- a/cmd/interop/src/main.cpp +++ b/cmd/interop/src/main.cpp @@ -48,7 +48,7 @@ make_test_vector(uint64_t type) case TestVectorClass::crypto_basics: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite); } @@ -59,7 +59,7 @@ make_test_vector(uint64_t type) auto cases = std::vector(); auto generations = std::vector{ 1, 15 }; - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite, 15, generations); } @@ -69,7 +69,7 @@ make_test_vector(uint64_t type) case TestVectorClass::message_protection: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite); } @@ -79,7 +79,7 @@ make_test_vector(uint64_t type) case TestVectorClass::key_schedule: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite, n); } @@ -89,7 +89,7 @@ make_test_vector(uint64_t type) case TestVectorClass::pre_shared_keys: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite, 5); } @@ -99,7 +99,7 @@ make_test_vector(uint64_t type) case TestVectorClass::tree_validation: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { for (const auto& tree_structure : all_tree_structures) { cases.emplace_back(suite, tree_structure); } @@ -111,7 +111,7 @@ make_test_vector(uint64_t type) case TestVectorClass::transcript_hash: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite); } @@ -121,7 +121,7 @@ make_test_vector(uint64_t type) case TestVectorClass::welcome: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { cases.emplace_back(suite); } @@ -143,7 +143,7 @@ make_test_vector(uint64_t type) case TestVectorClass::treekem: { auto cases = std::vector(); - for (const auto& suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto& suite : MLS_NAMESPACE::all_supported_cipher_suites) { for (const auto& tree_structure : treekem_test_tree_structures) { cases.emplace_back(suite, tree_structure); } diff --git a/cmd/interop/src/mls_client_impl.cpp b/cmd/interop/src/mls_client_impl.cpp index 8fcaaa2b..b69351bb 100644 --- a/cmd/interop/src/mls_client_impl.cpp +++ b/cmd/interop/src/mls_client_impl.cpp @@ -84,7 +84,7 @@ MLSClientImpl::SupportedCiphersuites( SupportedCiphersuitesResponse* reply) { reply->clear_ciphersuites(); - for (const auto suite : MLS_NAMESPACE::all_supported_suites) { + for (const auto suite : MLS_NAMESPACE::all_supported_cipher_suites) { reply->add_ciphersuites(static_cast(suite)); } return Status::OK; diff --git a/include/mls/crypto.h b/include/mls/crypto.h index b0a02fab..6ec19329 100644 --- a/include/mls/crypto.h +++ b/include/mls/crypto.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include diff --git a/lib/hpke/test/certificate.cpp b/lib/hpke/test/certificate.cpp index cd1d4297..2d94e6d3 100644 --- a/lib/hpke/test/certificate.cpp +++ b/lib/hpke/test/certificate.cpp @@ -601,18 +601,18 @@ TEST_CASE("Test Subject Parsing") TEST_CASE("Test Certificate notBefore status") { - // notBefore - 99 years from 04/22/2021 + // Certificate with notBefore = 2099-01-01, notAfter = 2126-03-17 const auto root_der = from_hex( - "3082016230820114a00302010202101dcfbd024e5f62ccfb04a1f32e7ce755300506032b65" - "70302a311530130603550403130c637573746f6d3a31323334353111300f06035504051308" - "31312d32322d33333020170d3236303330383036333631345a180f32313235303231323036" - "333631345a302a311530130603550403130c637573746f6d3a31323334353111300f060355" - "0405130831312d32322d3333302a300506032b6570032100cb6d233470f884eaa6e5a3b958" - "e7e68eff3fee146432ea526128171a33f8a403a34e304c300e0603551d0f0101ff04040302" - "02a4300f0603551d130101ff040530030101ff300d0603551d0e0406040459e6b3dd301a06" - "03551d1104133011810f7573657240646f6d61696e2e636f6d300506032b6570034100308a" - "a37cfbcd06e19b7a0728c5c970b38df5eb93d478970868ce6398a6a963b2c570edfd9dc62f" - "4d134de11eca367f9d967d6eae14192454770a2fc278963602"); + "3082016d3082011fa00302010202146917699f8fd719f5fa278b5ef781f273ecf9a79f3005" + "06032b6570302a3115301306035504030c0c637573746f6d3a31323334353111300f060355" + "0405130831312d32322d33333022180f32303939303130313030303030305a180f32313236" + "303331373139313035345a302a3115301306035504030c0c637573746f6d3a313233343531" + "11300f0603550405130831312d32322d3333302a300506032b6570032100cff799e44f092c" + "6c5c38f4b23d219846ef7012991e47e017cf01cfba00e91099a3533051301d0603551d0e04" + "160414638dd9f850dd78584ab3b5460bf3e410f591f88b301f0603551d2304183016801463" + "8dd9f850dd78584ab3b5460bf3e410f591f88b300f0603551d130101ff040530030101ff30" + "0506032b6570034100b98e4d86a77bce3820490b506eef20eb41c7bcfe3c7dff300d456760" + "66ae8abb96185ef0b220e12ec192cfc023c3e25a99cc1b0b010fcfbd391cd4dd7b00ec01"); auto root = Certificate{ root_der }; REQUIRE(root.expiration_status() == Certificate::ExpirationStatus::inactive); diff --git a/src/crypto.cpp b/src/crypto.cpp index a36516dd..f1dd3c1b 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -184,7 +184,7 @@ CipherSuite::get() const return ciphers_X448_CHACHA20POLY1305_SHA512_Ed448; #endif -#if !defined(P256_SHA256) +#if defined(WITH_PQ) case ID::MLKEM768X25519_AES256GCM_SHA384_Ed25519: return ciphers_MLKEM768X25519_AES256GCM_SHA384_Ed25519;