Commit 0f6b2ce6 authored by Niels Möller's avatar Niels Möller

(MEMEQH): New macro.

Rev: src/nettle/testsuite/testutils.h:1.10
parent eef954c6
...@@ -77,6 +77,11 @@ void ...@@ -77,6 +77,11 @@ void
test_rsa_sha1(struct rsa_public_key *pub, test_rsa_sha1(struct rsa_public_key *pub,
struct rsa_private_key *key, struct rsa_private_key *key,
mpz_t expected); mpz_t expected);
void
test_rsa_key(struct rsa_public_key *pub,
struct rsa_private_key *key);
#endif /* HAVE_LIBGMP */ #endif /* HAVE_LIBGMP */
#define H2(d, s) decode_hex((d), (s)) #define H2(d, s) decode_hex((d), (s))
...@@ -86,6 +91,9 @@ test_rsa_sha1(struct rsa_public_key *pub, ...@@ -86,6 +91,9 @@ test_rsa_sha1(struct rsa_public_key *pub,
#define LDATA(x) strlen(x), x #define LDATA(x) strlen(x), x
#define MEMEQ(length, a, b) (!memcmp((a), (b), (length))) #define MEMEQ(length, a, b) (!memcmp((a), (b), (length)))
#define MEMEQH(length, a, b) \
((length) == decode_hex_length((b)) \
&& !memcmp((a), decode_hex_dup((b)), (length)))
#define FAIL() abort() #define FAIL() abort()
#define SKIP() exit(77) #define SKIP() exit(77)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment