1
0
mirror of https://github.com/kakwa/uts-server synced 2024-11-05 01:08:51 +01:00

the max serial size is 160 bits, not 160 bytes...

This commit is contained in:
kakwa 2016-09-11 22:04:03 +02:00
parent c2d0bdfecb
commit a70f2fe754

View File

@ -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;