diff --git a/Userland/Libraries/LibTLS/Certificate.cpp b/Userland/Libraries/LibTLS/Certificate.cpp index 0d21ec074c9..444fbae19ba 100644 --- a/Userland/Libraries/LibTLS/Certificate.cpp +++ b/Userland/Libraries/LibTLS/Certificate.cpp @@ -349,7 +349,7 @@ static ErrorOr parse_validity(Crypto::ASN1::Decoder& decoder, Vector parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector current_scope) +ErrorOr parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector current_scope) { // SubjectPublicKeyInfo ::= Sequence { // algorithm AlgorithmIdentifier, @@ -387,9 +387,6 @@ static ErrorOr 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 parse_unique_identifier(Crypto::ASN1::Decoder& decoder, Vector current_scope) diff --git a/Userland/Libraries/LibTLS/Certificate.h b/Userland/Libraries/LibTLS/Certificate.h index f7bd33b5f4d..24eb951e1fc 100644 --- a/Userland/Libraries/LibTLS/Certificate.h +++ b/Userland/Libraries/LibTLS/Certificate.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -244,6 +245,7 @@ public: AlgorithmIdentifier algorithm; ByteBuffer raw_key; }; +ErrorOr parse_subject_public_key_info(Crypto::ASN1::Decoder& decoder, Vector current_scope = {}); class Certificate { public: