Merge pull request #1287 from rckclmbr/fix_serial_size
Fix getting long serial numbers for openssl < 1.1
This commit is contained in:
commit
dbb5f00d68
|
@ -2046,9 +2046,9 @@ StringRef get_x509_serial(BlockAllocator &balloc, X509 *x) {
|
|||
return StringRef{};
|
||||
}
|
||||
|
||||
std::array<uint8_t, 8> b;
|
||||
std::array<uint8_t, 20> b;
|
||||
auto n = BN_bn2bin(bn, b.data());
|
||||
assert(n == b.size());
|
||||
assert(n <= 20);
|
||||
|
||||
return util::format_hex(balloc, StringRef{std::begin(b), std::end(b)});
|
||||
#endif // !OPENSSL_1_1_API
|
||||
|
|
Loading…
Reference in New Issue