1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +00:00

LibCrypto: Store the TBS ASN.1 data on the certificate

This way we dont need to guess the offsets in LibTLS when using it.
This commit is contained in:
stelar7 2023-04-12 15:05:08 +02:00 committed by Ali Mohammad Pur
parent 24c7995743
commit 0b70314379
4 changed files with 25 additions and 0 deletions

View file

@ -67,6 +67,16 @@ ErrorOr<u8> Decoder::read_byte()
return byte;
}
ErrorOr<ReadonlyBytes> Decoder::peek_entry_bytes()
{
if (m_stack.is_empty())
return Error::from_string_literal("ASN1::Decoder: Reading bytes from an empty stack");
auto entry = m_stack.last();
return entry;
}
ErrorOr<ReadonlyBytes> Decoder::read_bytes(size_t length)
{
if (m_stack.is_empty())