Skip to content
This repository was archived by the owner on Jul 2, 2025. It is now read-only.

Commit b3acfe5

Browse files
Update Relic anchor to aecdcae. Addresses issue #271 (#277)
* Update Relic anchor to aecdcae7956f542fbee2392c1f0feb0a8ac41dc5. Addresses issue #271. * Update tests * Switch relic_ietf_64 to the aecdcae version. * Use our main repo as the related PR got merged. Co-authored-by: Mariano Sorgente <sorgente711@gmail.com>
1 parent 0dfd8b6 commit b3acfe5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ FetchContent_MakeAvailable(Sodium)
4444
if (DEFINED ENV{RELIC_MAIN})
4545
set(RELIC_GIT_TAG "origin/main")
4646
else ()
47-
# This is currently anchored to upstream b7b2266a0e4ee6f628f61d3ab638f524a18b52f1
48-
set(RELIC_GIT_TAG "31ca41446528f4c35525d5690da249ce6c0d43a1")
47+
# This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5
48+
set(RELIC_GIT_TAG "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7")
4949
endif ()
5050

5151
message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")

src/test.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,9 @@ TEST_CASE("Error handling")
468468
SECTION("Should throw on a bad public key")
469469
{
470470
vector<uint8_t> buf(G1Element::SIZE, 0);
471-
// This are all the "first byte values" which are tested to be valid G1 elements if the remaining bytes are zero.
472-
std::vector<uint8_t> vecValid{0x85, 0x86, 0x87, 0x88, 0x89, 0x8C, 0x8F, 0x91, 0x93, 0x94, 0x96, 0x98, 0x99, 0x9A,
473-
0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAC, 0xAF, 0xB1, 0xB3, 0xB4, 0xB6, 0xB8, 0xB9, 0xBA,
474-
0xC0};
475471
for (int i = 0; i < 0xFF; i++) {
476472
buf[0] = (uint8_t)i;
477-
if (std::find(vecValid.begin(), vecValid.end(), i) != vecValid.end()) {
473+
if (i == 0xc0) { // Infinity prefix shouldn't throw here as we have only zero values
478474
REQUIRE_NOTHROW(G1Element::FromByteVector(buf));
479475
} else {
480476
REQUIRE_THROWS(G1Element::FromByteVector(buf));
@@ -485,7 +481,6 @@ TEST_CASE("Error handling")
485481
SECTION("Should throw on a bad G2Element")
486482
{
487483
vector<uint8_t> buf(G2Element::SIZE, 0);
488-
489484
for (int i = 0; i < 0xFF; i++) {
490485
buf[0] = (uint8_t)i;
491486
if (i == 0xc0) { // Infinity prefix shouldn't throw here as we have only zero values

0 commit comments

Comments
 (0)