Skip to content

Commit 5238018

Browse files
use macro for default example buffer size
1 parent 10caec0 commit 5238018

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkcs7/envelopedData-ktri-stream.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,16 @@ static int envelopedData_decrypt(byte* in, word32 inSz, byte* cert,
192192
#if defined(HAVE_PKCS7) && defined(ASN_BER_TO_DER)
193193

194194
#define EXTRA_ASN1_SIZE 1024
195+
#define DEFAULT_EXAMPLE_BUFFER_SIZE 2048
195196

196197
int main(int argc, char** argv)
197198
{
198199
int ret = 0;
199200
int encryptedSz = 0, decryptedSz;
200201
word32 certSz, keySz, contentSz = 0;
201202

202-
byte cert[2048];
203-
byte key[2048];
203+
byte cert[DEFAULT_EXAMPLE_BUFFER_SIZE];
204+
byte key[DEFAULT_EXAMPLE_BUFFER_SIZE];
204205
byte* encrypted = NULL;
205206
byte* decrypted = NULL;
206207

0 commit comments

Comments
 (0)