Unverified Commit dbb5f00d authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa Committed by GitHub

Merge pull request #1287 from rckclmbr/fix_serial_size

Fix getting long serial numbers for openssl < 1.1
parents 9cc412e2 5b2efc0a
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment