add missing include. Fix format string.

This commit is contained in:
pwpiwi 2019-01-19 17:36:33 +01:00
commit 79ebd86a29
2 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,7 @@
#include "emv_roca.h"
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
@ -91,7 +92,7 @@ void print_mpi(const char *msg, int radix, const mbedtls_mpi *X) {
size_t len = 0;
mbedtls_mpi_write_string(X, radix, Xchar, sizeof(Xchar), &len);
printf("%s[%d] %s\n", msg, len, Xchar);
printf("%s[%zd] %s\n", msg, len, Xchar);
}
bool emv_rocacheck(const unsigned char *buf, size_t buflen, bool verbose) {

View file

@ -24,7 +24,7 @@
#ifndef EMV_ROCA_H__
#define EMV_ROCA_H__
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#define ROCA_PRINTS_LENGTH 17