From c68c9b85ada5a73d8db4fefaec79050ba72bd194 Mon Sep 17 00:00:00 2001 From: kakwa Date: Sun, 11 Sep 2016 22:04:03 +0200 Subject: [PATCH] the max serial size is 160 bits, not 160 bytes... --- src/lib/rfc3161.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/rfc3161.c b/src/lib/rfc3161.c index 6f30dd0..ed516ed 100644 --- a/src/lib/rfc3161.c +++ b/src/lib/rfc3161.c @@ -358,7 +358,7 @@ end: // It's less painful to manage than an incremental serial stored in a file // and a 150 bits size is more than enough to prevent collision. static ASN1_INTEGER *serial_cb(TS_RESP_CTX *ctx, void *data42) { - unsigned char data[150] = {0}; + unsigned char data[20] = {0}; RAND_bytes(data, sizeof(data)); // data[0] &= 0x7F;