we don't accept a serial number with leading zeroes

This commit is contained in:
Andreas Steffen
2010-03-14 19:41:40 +01:00
parent d5f1b9b3c1
commit c0df187cb4
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -212,6 +212,11 @@ static int issue()
goto end;
}
rng->allocate_bytes(rng, 8, &serial);
while (*serial.ptr == 0x00)
{
/* we don't accept a serial number with leading zeroes */
rng->get_bytes(rng, 1, serial.ptr);
}
rng->destroy(rng);
}
+5
View File
@@ -158,6 +158,11 @@ static int self()
goto end;
}
rng->allocate_bytes(rng, 8, &serial);
while (*serial.ptr == 0x00)
{
/* we don't accept a serial number with leading zeroes */
rng->get_bytes(rng, 1, serial.ptr);
}
rng->destroy(rng);
}
not_before = time(NULL);