From 35733aaf5f384f26a3a736f2ab54f638646bc086 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 17 Jun 2015 16:58:06 -0400 Subject: Debug RSA key generation. --- tests/test-rsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test-rsa.c b/tests/test-rsa.c index 814541c..08d22c5 100644 --- a/tests/test-rsa.c +++ b/tests/test-rsa.c @@ -160,7 +160,7 @@ static int test_gen(const char * const kind, const rsa_tc_t * const tc) return 0; } - if (fwrite(der, der_len, 1, f) != der_len) { + if (fwrite(der, der_len, 1, f) != 1) { printf("Length mismatch writing %s\n", fn); return 0; } @@ -183,7 +183,7 @@ static int test_gen(const char * const kind, const rsa_tc_t * const tc) return 0; } - if (fwrite(result, sizeof(result), 1, f) != sizeof(result)) { + if (fwrite(result, sizeof(result), 1, f) != 1) { printf("Length mismatch writing %s key\n", fn); return 0; } -- cgit v1.2.3