Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / pub / dsa-sign.c
index 7593a74..88054eb 100644 (file)
@@ -119,6 +119,7 @@ void dsa_sign(dsa_param *dp, mp *a,
 
 #ifdef TEST_RIG
 
+#include <mLib/macros.h>
 #include <mLib/testrig.h>
 
 #include "sha.h"
@@ -145,8 +146,8 @@ static int verify(dstr *v)
           s.r, sizeof(s.r), s.s, sizeof(s.s));
 
   if (v[6].len != sizeof(s.r) || v[7].len != sizeof(s.s) ||
-      memcmp(s.r, v[6].buf, sizeof(s.r)) != 0 ||
-      memcmp(s.s, v[7].buf, sizeof(s.s)) != 0) {
+      MEMCMP(s.r, !=, v[6].buf, sizeof(s.r)) ||
+      MEMCMP(s.s, !=, v[7].buf, sizeof(s.s))) {
     fputs("\n*** signature failed", stderr);
     fputs("\nq = ", stderr); mp_writefile(dp.q, stderr, 16);
     fputs("\np = ", stderr); mp_writefile(dp.p, stderr, 16);