Skip to content

Commit 7c9eaa8

Browse files
JacobBarthelmehdgarske
authored andcommitted
adjust benchmark file names and remove white space
1 parent 3d8b8bb commit 7c9eaa8

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

pkcs7/benchmark-streaming-envelop.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
#include <stdio.h>
3232
#include <sys/time.h>
3333

34-
#define CONTENT_FILE_NAME "conent-benchmark.bin"
34+
#define CONTENT_FILE_NAME "benchmark-content.bin"
3535
#define ENCODED_FILE_NAME "test-stream-dec.p7b"
36+
#define DECODED_FILE_NAME "benchmark-decrypted.bin"
3637
#define TEST_STREAM_CHUNK_SIZE 1000
3738

3839
struct timeval startTime;
@@ -216,6 +217,15 @@ static int EncodePKCS7Bundle(double contentSz, WC_RNG* rng)
216217
per = GetMBs(ret);
217218
printf("%.2f MB/s", per);
218219
}
220+
221+
if (io.out != NULL) {
222+
fclose(io.out);
223+
}
224+
225+
if (io.in != NULL) {
226+
fclose(io.in);
227+
}
228+
219229
printf(" : ret = %d\n", ret);
220230
return 0;
221231
}
@@ -253,7 +263,6 @@ static int DecodePKCS7Bundle(void)
253263
printf("Decoding PKCS7 bundle ... ");
254264
TimeLogStart();
255265

256-
257266
pkcs7 = wc_PKCS7_New(NULL, 0);
258267
if (pkcs7 == NULL) {
259268
ret = MEMORY_E;
@@ -270,7 +279,7 @@ static int DecodePKCS7Bundle(void)
270279
}
271280

272281
if (ret == 0) {
273-
out = fopen("benchmark-decrypted.bin", "wb");
282+
out = fopen(DECODED_FILE_NAME, "wb");
274283
if (out == NULL) {
275284
printf("Unable to open decrypted data out file\n");
276285
ret = -1;

0 commit comments

Comments
 (0)