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

LibTLS: Move SignatureAlgorithm to Extensions.h

Also add missing values from the IANA registry
This commit is contained in:
stelar7 2023-04-14 00:19:20 +02:00 committed by Sam Atkins
parent e5f81475e5
commit fba7695dcc
2 changed files with 17 additions and 9 deletions

View file

@ -7,6 +7,7 @@
#pragma once
#include <AK/Types.h>
#include <LibTLS/Extensions.h>
namespace TLS {
@ -105,14 +106,6 @@ enum class HashAlgorithm : u8 {
SHA512 = 6,
};
// Defined in RFC 5246 section 7.4.1.4.1
enum class SignatureAlgorithm : u8 {
Anonymous = 0,
RSA = 1,
DSA = 2,
ECDSA = 3,
};
// Defined in RFC 5246 section 7.4.1.4.1
struct SignatureAndHashAlgorithm {
HashAlgorithm hash;
@ -158,7 +151,7 @@ constexpr SignatureAlgorithm signature_for_key_exchange_algorithm(KeyExchangeAlg
case KeyExchangeAlgorithm::DH_anon:
case KeyExchangeAlgorithm::ECDH_anon:
default:
return SignatureAlgorithm::Anonymous;
return SignatureAlgorithm::ANONYMOUS;
}
}