const char *hmac; /* Expected output for HMAC tests. */
const char *key; /* MAC key.*/
int psize; /* Input (plaintext) size. */
- int outsize; /* Compare to EVP_MD_size() / EVP_MAC_size() if non-zero. */
+ size_t outsize; /* Compare to EVP_MD_size() / EVP_MAC_size() if non-zero. */
int truncate; /* Truncated output (digest) size. */
int key_size; /* MAC key size. */
int block_size; /* Internal block size. */
const struct hash_testvec *t)
{
if (!iter)
- printf("[MAC %d] ", t->outsize);
+ printf("[MAC %zu] ", t->outsize);
size_t acpkm = (size_t)t->acpkm;
size_t acpkm_t = (size_t)t->acpkm_t;
const struct hash_testvec *t)
{
if (!iter)
- printf("[MD %d] ", t->outsize);
+ printf("[MD %zu] ", t->outsize);
if (t->outsize)
T(EVP_MD_size(type) == t->outsize);
size_t outsize;
T(mdtype = EVP_get_digestbynid(hash_nid));
T(EVP_VerifyInit(md_ctx, mdtype));
/* Feed byte-by-byte. */
- int i;
+ size_t i;
for (i = 0; i < t->data_len; i++)
T(EVP_VerifyUpdate(md_ctx, &t->data[i], 1));
err = EVP_VerifyFinal(md_ctx, sig, siglen, pkey);
struct test_sign {
const char *name;
- unsigned int nid;
+ int nid;
size_t bits;
const char *paramset;
};
const EC_GROUP *group = EC_KEY_get0_group(ec);
int curve_name = EC_GROUP_get_curve_name(group);
err = curve_name == t->nid;
- printf("\tcurve_name (%u):\t", t->nid);
+ printf("\tcurve_name (%d):\t", t->nid);
print_test_tf(err, curve_name, "match", "mismatch");
ret |= !err;