Don't use reserved identifiers memczero and benchmark_verify_t

As identified in #829 and #833. Fixes #829.

Since we touch this anyway, this commit additionally makes the
identifiers in the benchmark files a little bit more consistent.
This commit is contained in:
Tim Ruffing
2020-10-20 14:53:50 +02:00
parent c6b6b8f1bb
commit e89278f211
7 changed files with 22 additions and 22 deletions

View File

@@ -5444,18 +5444,18 @@ void run_ecdsa_openssl(void) {
# include "modules/schnorrsig/tests_impl.h"
#endif
void run_memczero_test(void) {
void run_secp256k1_memczero_test(void) {
unsigned char buf1[6] = {1, 2, 3, 4, 5, 6};
unsigned char buf2[sizeof(buf1)];
/* memczero(..., ..., 0) is a noop. */
/* secp256k1_memczero(..., ..., 0) is a noop. */
memcpy(buf2, buf1, sizeof(buf1));
memczero(buf1, sizeof(buf1), 0);
secp256k1_memczero(buf1, sizeof(buf1), 0);
CHECK(secp256k1_memcmp_var(buf1, buf2, sizeof(buf1)) == 0);
/* memczero(..., ..., 1) zeros the buffer. */
/* secp256k1_memczero(..., ..., 1) zeros the buffer. */
memset(buf2, 0, sizeof(buf2));
memczero(buf1, sizeof(buf1) , 1);
secp256k1_memczero(buf1, sizeof(buf1) , 1);
CHECK(secp256k1_memcmp_var(buf1, buf2, sizeof(buf1)) == 0);
}
@@ -5723,7 +5723,7 @@ int main(int argc, char **argv) {
#endif
/* util tests */
run_memczero_test();
run_secp256k1_memczero_test();
run_cmov_tests();