mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibTLS: Move HashAlgorithm to Extensions.h
Also add missing values from the IANA registry
This commit is contained in:
parent
fba7695dcc
commit
da8edece29
Notes:
sideshowbarker
2024-07-16 21:26:30 +09:00
Author: https://github.com/stelar7 Commit: https://github.com/SerenityOS/serenity/commit/da8edece29 Pull-request: https://github.com/SerenityOS/serenity/pull/18356 Reviewed-by: https://github.com/alimpfard ✅
|
@ -95,17 +95,6 @@ enum class CipherSuite {
|
|||
AES_128_CCM_8_SHA256 = 0x1305,
|
||||
};
|
||||
|
||||
// Defined in RFC 5246 section 7.4.1.4.1
|
||||
enum class HashAlgorithm : u8 {
|
||||
None = 0,
|
||||
MD5 = 1,
|
||||
SHA1 = 2,
|
||||
SHA224 = 3,
|
||||
SHA256 = 4,
|
||||
SHA384 = 5,
|
||||
SHA512 = 6,
|
||||
};
|
||||
|
||||
// Defined in RFC 5246 section 7.4.1.4.1
|
||||
struct SignatureAndHashAlgorithm {
|
||||
HashAlgorithm hash;
|
||||
|
|
|
@ -272,6 +272,21 @@ enum class SignatureAlgorithm : u8 {
|
|||
__ENUM_SIGNATURE_ALGORITHM
|
||||
};
|
||||
|
||||
// https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-18
|
||||
#define __ENUM_HASH_ALGORITHM \
|
||||
_ENUM_KEY_VALUE(NONE, 0) \
|
||||
_ENUM_KEY_VALUE(MD5, 1) \
|
||||
_ENUM_KEY_VALUE(SHA1, 2) \
|
||||
_ENUM_KEY_VALUE(SHA224, 3) \
|
||||
_ENUM_KEY_VALUE(SHA256, 4) \
|
||||
_ENUM_KEY_VALUE(SHA384, 5) \
|
||||
_ENUM_KEY_VALUE(SHA512, 6) \
|
||||
_ENUM_KEY_VALUE(INTRINSIC, 8)
|
||||
|
||||
enum class HashAlgorithm : u8 {
|
||||
__ENUM_HASH_ALGORITHM
|
||||
};
|
||||
|
||||
#undef _ENUM_KEY
|
||||
#undef _ENUM_KEY_VALUE
|
||||
|
||||
|
|
Loading…
Reference in a new issue