mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 15:45:08 +00:00

This adds a function to parse multiple PEMs out of a single input. This allows us to load certificates from a cacert.pem file without need for preprocessing.
18 lines
334 B
C++
18 lines
334 B
C++
/*
|
|
* Copyright (c) 2020, Ali Mohammad Pur <mpfard@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Span.h>
|
|
#include <LibCrypto/ASN1/ASN1.h>
|
|
#include <LibCrypto/ASN1/DER.h>
|
|
|
|
namespace Crypto {
|
|
|
|
ByteBuffer decode_pem(ReadonlyBytes);
|
|
ErrorOr<Vector<ByteBuffer>> decode_pems(ReadonlyBytes);
|
|
|
|
}
|