diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d3671d2..6922167b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,8 +44,8 @@ FetchContent_MakeAvailable(Sodium) if (DEFINED ENV{RELIC_MAIN}) set(RELIC_GIT_TAG "origin/main") else () - # This is currently anchored to upstream b7b2266a0e4ee6f628f61d3ab638f524a18b52f1 - set(RELIC_GIT_TAG "31ca41446528f4c35525d5690da249ce6c0d43a1") + # This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5 + set(RELIC_GIT_TAG "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7") endif () message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}") diff --git a/src/test.cpp b/src/test.cpp index 7a59847b7..5af5ea775 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -468,13 +468,9 @@ TEST_CASE("Error handling") SECTION("Should throw on a bad public key") { vector buf(G1Element::SIZE, 0); - // This are all the "first byte values" which are tested to be valid G1 elements if the remaining bytes are zero. - std::vector vecValid{0x85, 0x86, 0x87, 0x88, 0x89, 0x8C, 0x8F, 0x91, 0x93, 0x94, 0x96, 0x98, 0x99, 0x9A, - 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAC, 0xAF, 0xB1, 0xB3, 0xB4, 0xB6, 0xB8, 0xB9, 0xBA, - 0xC0}; for (int i = 0; i < 0xFF; i++) { buf[0] = (uint8_t)i; - if (std::find(vecValid.begin(), vecValid.end(), i) != vecValid.end()) { + if (i == 0xc0) { // Infinity prefix shouldn't throw here as we have only zero values REQUIRE_NOTHROW(G1Element::FromByteVector(buf)); } else { REQUIRE_THROWS(G1Element::FromByteVector(buf)); @@ -485,7 +481,6 @@ TEST_CASE("Error handling") SECTION("Should throw on a bad G2Element") { vector buf(G2Element::SIZE, 0); - for (int i = 0; i < 0xFF; i++) { buf[0] = (uint8_t)i; if (i == 0xc0) { // Infinity prefix shouldn't throw here as we have only zero values