vcl mscrypto PDF sign: fix typo in GetDERLengthOfLength()
When id-aa-signingCertificateV2 had a value that was larger than 255 bytes, then the header size is expected to be 4 bytes, but it was only 3. The length part of the header is 3 bytes: one byte declaring the length-of-length, and 3 bytes for the length. We added this additional byte to the result too early, that way we counted that e.g. 278 (the number) fits into a single uint8_t, which is not the case. Also introduce named constants for some of the hardwired numbers in the code for better readability. Change-Id: I816236e5ac561c9d21bd9df703385ee2201482e7
Showing
Please
register
or
sign in
to comment