mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +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
2 changed files with 15 additions and 11 deletions
|
@ -95,17 +95,6 @@ enum class CipherSuite {
|
||||||
AES_128_CCM_8_SHA256 = 0x1305,
|
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
|
// Defined in RFC 5246 section 7.4.1.4.1
|
||||||
struct SignatureAndHashAlgorithm {
|
struct SignatureAndHashAlgorithm {
|
||||||
HashAlgorithm hash;
|
HashAlgorithm hash;
|
||||||
|
|
|
@ -272,6 +272,21 @@ enum class SignatureAlgorithm : u8 {
|
||||||
__ENUM_SIGNATURE_ALGORITHM
|
__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
|
||||||
#undef _ENUM_KEY_VALUE
|
#undef _ENUM_KEY_VALUE
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue