From 36f78c5e1d533d548c900ba675ad4e5729a10726 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 15 Jan 2014 15:42:27 -0800 Subject: [PATCH] 1. Bug fix for taking the size of something. (Used wrong variable name.) 2. Renamed PKCS7 signed data test output file. 3. Added PKCS7 data test output files to gitignore. --- .gitignore | 4 ++-- ctaocrypt/src/pkcs7.c | 2 +- ctaocrypt/test/test.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c9629d289..d5d705070 100644 --- a/.gitignore +++ b/.gitignore @@ -54,8 +54,8 @@ key.der key.pem certreq.der certreq.pem -pkcs7test.der -pkcs7test.pem +pkcs7signedData.der +pkcs7envelopedData.der diff sslSniffer/sslSnifferTest/tracefile.txt *.gz diff --git a/ctaocrypt/src/pkcs7.c b/ctaocrypt/src/pkcs7.c index e47971a2f..2dc3bcd3c 100644 --- a/ctaocrypt/src/pkcs7.c +++ b/ctaocrypt/src/pkcs7.c @@ -317,7 +317,7 @@ int PKCS7_EncodeSignedData(PKCS7* pkcs7, byte* output, word32 outputSz) byte* flatSignedAttribs = NULL; word32 flatSignedAttribsSz = 0; word32 innerOidSz = sizeof(innerOid); - word32 outerOidSz = sizeof(outerOidSz); + word32 outerOidSz = sizeof(outerOid); XMEMSET(&esd, 0, sizeof(esd)); InitSha(&esd.sha); diff --git a/ctaocrypt/test/test.c b/ctaocrypt/test/test.c index 2ac13908f..b55ed6d13 100644 --- a/ctaocrypt/test/test.c +++ b/ctaocrypt/test/test.c @@ -4125,7 +4125,7 @@ int pkcs7_test(void) outSz = ret; /* write PKCS#7 to output file for more testing */ - pkcs7File = fopen("./pkcs7test.der", "wb"); + pkcs7File = fopen("./pkcs7signedData.der", "wb"); if (!pkcs7File) return -43; ret = (int)fwrite(out, outSz, 1, pkcs7File);