LibTLS: Export parse_subject_public_key_info
LibWeb wants to call this for Web Crypto.
This commit is contained in:
parent
e422c93537
commit
7b27c1ce6c
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/7b27c1ce6c Pull-request: https://github.com/SerenityOS/serenity/pull/23596 Reviewed-by: https://github.com/alimpfard
2 changed files with 3 additions and 4 deletions
|
@ -349,7 +349,7 @@ static ErrorOr<Validity> parse_validity(Crypto::ASN1::Decoder& decoder, Vector<S
|
|||
return validity;
|
||||
}
|
||||
|
||||
static ErrorOr<SubjectPublicKey> parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
|
||||
ErrorOr<SubjectPublicKey> parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
|
||||
{
|
||||
// SubjectPublicKeyInfo ::= Sequence {
|
||||
// algorithm AlgorithmIdentifier,
|
||||
|
@ -387,9 +387,6 @@ static ErrorOr<SubjectPublicKey> parse_subject_public_key_info(Crypto::ASN1::Dec
|
|||
|
||||
String algo_oid = TRY(String::join("."sv, public_key.algorithm.identifier));
|
||||
ERROR_WITH_SCOPE(TRY(String::formatted("Unhandled algorithm {}", algo_oid)));
|
||||
|
||||
EXIT_SCOPE();
|
||||
return public_key;
|
||||
}
|
||||
|
||||
static ErrorOr<Crypto::ASN1::BitStringView> parse_unique_identifier(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope)
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <AK/Time.h>
|
||||
#include <AK/Types.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCrypto/ASN1/DER.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
#include <LibCrypto/PK/RSA.h>
|
||||
#include <LibTLS/Extensions.h>
|
||||
|
@ -244,6 +245,7 @@ public:
|
|||
AlgorithmIdentifier algorithm;
|
||||
ByteBuffer raw_key;
|
||||
};
|
||||
ErrorOr<SubjectPublicKey> parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector<StringView> current_scope = {});
|
||||
|
||||
class Certificate {
|
||||
public:
|
||||
|
|
Loading…
Add table
Reference in a new issue