aboutsummaryrefslogtreecommitdiff
path: root/tests/test-rsa.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-06-17 16:58:06 -0400
committerRob Austein <sra@hactrn.net>2015-06-17 16:58:06 -0400
commit35733aaf5f384f26a3a736f2ab54f638646bc086 (patch)
treea4c0681bb224896724e424de2b4a2799834579a6 /tests/test-rsa.c
parentab5a8760becf4711afa68221a5610e5572686f1f (diff)
Debug RSA key generation.
Diffstat (limited to 'tests/test-rsa.c')
-rw-r--r--tests/test-rsa.c4
1 files changed, 2 insertions, 2 deletions
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;
}