refactor: Retire RequireFullyCanonicalSig amendment (#6035)

Amendments activated for more than 2 years can be retired. This change retires the RequireFullyCanonicalSig amendment.
This commit is contained in:
Jingchen
2025-11-24 13:58:37 +00:00
committed by GitHub
parent a791c03dc1
commit 21c02232a5
14 changed files with 51 additions and 146 deletions

View File

@@ -145,7 +145,7 @@ public:
auto sig = sign(pk, sk, makeSlice(data));
BEAST_EXPECT(sig.size() != 0);
BEAST_EXPECT(verify(pk, makeSlice(data), sig, true));
BEAST_EXPECT(verify(pk, makeSlice(data), sig));
// Construct wrong data:
auto badData = data;
@@ -156,17 +156,17 @@ public:
std::max_element(badData.begin(), badData.end()));
// Wrong data: should fail
BEAST_EXPECT(!verify(pk, makeSlice(badData), sig, true));
BEAST_EXPECT(!verify(pk, makeSlice(badData), sig));
// Slightly change the signature:
if (auto ptr = sig.data())
ptr[j % sig.size()]++;
// Wrong signature: should fail
BEAST_EXPECT(!verify(pk, makeSlice(data), sig, true));
BEAST_EXPECT(!verify(pk, makeSlice(data), sig));
// Wrong data and signature: should fail
BEAST_EXPECT(!verify(pk, makeSlice(badData), sig, true));
BEAST_EXPECT(!verify(pk, makeSlice(badData), sig));
}
}
}