Deploy the new <ctype.h> and `foocmp' macros from mLib.
[catacomb] / pub / rsa-pub.c
index 5e13182..bb402a3 100644 (file)
@@ -29,6 +29,7 @@
 #include <mLib/alloc.h>
 #include <mLib/bits.h>
 #include <mLib/dstr.h>
+#include <mLib/macros.h>
 
 #include "mp.h"
 #include "mpmont.h"
@@ -200,7 +201,7 @@ int rsa_verify(rsa_pubctx *rp, mp *s, const void *m, size_t msz,
   dstr_ensure(d, n);
   rc = e(p, m, msz, (octet *)d->buf + d->len, n, nb, earg);
   if (rc > 0 && m) {
-    if (rc != msz || memcmp(d->buf + d->len, m, msz) != 0)
+    if (rc != msz || MEMCMP(d->buf + d->len, !=, m, msz))
       rc = -1;
     else
       rc = 0;