diff options
Diffstat (limited to 'Userland/Libraries/LibCrypto/ASN1/DER.cpp')
-rw-r--r-- | Userland/Libraries/LibCrypto/ASN1/DER.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibCrypto/ASN1/DER.cpp b/Userland/Libraries/LibCrypto/ASN1/DER.cpp index 3beeb221ae..1fcbbc113b 100644 --- a/Userland/Libraries/LibCrypto/ASN1/DER.cpp +++ b/Userland/Libraries/LibCrypto/ASN1/DER.cpp @@ -190,14 +190,13 @@ Result<StringView, DecodeError> Decoder::decode_printable_string(ReadonlyBytes d return StringView { data }; } -Result<Bitmap, DecodeError> Decoder::decode_bit_string(ReadonlyBytes data) +Result<const BitmapView, DecodeError> Decoder::decode_bit_string(ReadonlyBytes data) { if (data.size() < 1) return DecodeError::InvalidInputFormat; auto unused_bits = data[0]; - // FIXME: It's rather annoying that `Bitmap` is always mutable. - return Bitmap::wrap(const_cast<u8*>(data.offset_pointer(1)), data.size() * 8 - unused_bits); + return BitmapView { const_cast<u8*>(data.offset_pointer(1)), data.size() * 8 - unused_bits }; } Result<Tag, DecodeError> Decoder::peek() |