| 1 |
# Copyright: (c) 2022, Jordan Borean (@jborean93) <[email protected]> |
| 2 |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) |
| 3 |
|
| 4 |
import enum |
| 5 |
import typing |
| 6 |
|
| 7 |
|
| 8 |
def _add_missing_enum_member( |
| 9 |
cls: typing.Type[enum.IntEnum], |
| 10 |
value: object, |
| 11 |
label: str, |
| 12 |
) -> typing.Optional[enum.Enum]: |
| 13 |
if not isinstance(value, int): |
| 14 |
return None |
| 15 |
|
| 16 |
new_member = int.__new__(cls) |
| 17 |
new_member._name_ = label.format(value) |
| 18 |
new_member._value_ = value |
| 19 |
return cls._value2member_map_.setdefault(value, new_member) |
| 20 |
|
| 21 |
|
| 22 |
class TlsProtocolVersion(enum.IntEnum): |
| 23 |
tls1_0 = 0x0301 |
| 24 |
tls1_1 = 0x0302 |
| 25 |
tls1_2 = 0x0303 |
| 26 |
tls1_3 = 0x0304 |
| 27 |
|
| 28 |
@classmethod |
| 29 |
def native_labels(cls) -> typing.Dict["TlsProtocolVersion", str]: |
| 30 |
return { |
| 31 |
TlsProtocolVersion.tls1_0: "TLS 1.0 (0x0301)", |
| 32 |
TlsProtocolVersion.tls1_1: "TLS 1.1 (0x0302)", |
| 33 |
TlsProtocolVersion.tls1_2: "TLS 1.2 (0x0303)", |
| 34 |
TlsProtocolVersion.tls1_3: "TLS 1.3 (0x0304)", |
| 35 |
} |
| 36 |
|
| 37 |
@classmethod |
| 38 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 39 |
return _add_missing_enum_member(cls, value, "Unknown TLS Protocol Version 0x{0:04X}") |
| 40 |
|
| 41 |
|
| 42 |
class TlsContentType(enum.IntEnum): |
| 43 |
invalid = 0 |
| 44 |
change_cipher_spec = 20 |
| 45 |
alert = 21 |
| 46 |
handshake = 22 |
| 47 |
application_data = 23 |
| 48 |
|
| 49 |
@classmethod |
| 50 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 51 |
return _add_missing_enum_member(cls, value, "Unknown TLS Content Type 0x{0:02X}") |
| 52 |
|
| 53 |
|
| 54 |
class TlsHandshakeMessageType(enum.IntEnum): |
| 55 |
hello_request = 0 |
| 56 |
client_hello = 1 |
| 57 |
server_hello = 2 |
| 58 |
hello_verify_request = 3 |
| 59 |
new_session_ticket = 4 |
| 60 |
end_of_early_data = 5 |
| 61 |
hello_retry_request = 6 |
| 62 |
encrypted_extensions = 8 |
| 63 |
request_connection_id = 9 |
| 64 |
new_connection_id = 10 |
| 65 |
certificate = 11 |
| 66 |
server_key_exchange = 12 |
| 67 |
certificate_request = 13 |
| 68 |
server_hello_done = 14 |
| 69 |
certificate_verify = 15 |
| 70 |
client_key_exchange = 16 |
| 71 |
client_certificate_request = 17 |
| 72 |
finished = 20 |
| 73 |
certificate_url = 21 |
| 74 |
certificate_status = 22 |
| 75 |
supplemental_data = 23 |
| 76 |
key_update = 24 |
| 77 |
compressed_certificate = 25 |
| 78 |
ekt_key = 26 |
| 79 |
message_hash = 254 |
| 80 |
|
| 81 |
@classmethod |
| 82 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 83 |
return _add_missing_enum_member(cls, value, "Unknown Handshake Message Type 0x{0:02X}") |
| 84 |
|
| 85 |
|
| 86 |
class TlsCipherSuite(enum.IntEnum): |
| 87 |
TLS_NULL_WITH_NULL_NULL = 0x0000 |
| 88 |
TLS_RSA_WITH_NULL_MD5 = 0x0001 |
| 89 |
TLS_RSA_WITH_NULL_SHA = 0x0002 |
| 90 |
TLS_RSA_EXPORT_WITH_RC4_40_MD5 = 0x0003 |
| 91 |
TLS_RSA_WITH_RC4_128_MD5 = 0x0004 |
| 92 |
TLS_RSA_WITH_RC4_128_SHA = 0x0005 |
| 93 |
TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 0x0006 |
| 94 |
TLS_RSA_WITH_IDEA_CBC_SHA = 0x0007 |
| 95 |
TLS_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0008 |
| 96 |
TLS_RSA_WITH_DES_CBC_SHA = 0x0009 |
| 97 |
TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A |
| 98 |
TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x000B |
| 99 |
TLS_DH_DSS_WITH_DES_CBC_SHA = 0x000C |
| 100 |
TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x000D |
| 101 |
TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x000E |
| 102 |
TLS_DH_RSA_WITH_DES_CBC_SHA = 0x000F |
| 103 |
TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0010 |
| 104 |
TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x0011 |
| 105 |
TLS_DHE_DSS_WITH_DES_CBC_SHA = 0x0012 |
| 106 |
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013 |
| 107 |
TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0014 |
| 108 |
TLS_DHE_RSA_WITH_DES_CBC_SHA = 0x0015 |
| 109 |
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016 |
| 110 |
TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = 0x0017 |
| 111 |
TLS_DH_anon_WITH_RC4_128_MD5 = 0x0018 |
| 112 |
TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 0x0019 |
| 113 |
TLS_DH_anon_WITH_DES_CBC_SHA = 0x001A |
| 114 |
TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 0x001B |
| 115 |
TLS_KRB5_WITH_DES_CBC_SHA = 0x001E |
| 116 |
TLS_KRB5_WITH_3DES_EDE_CBC_SHA = 0x001F |
| 117 |
TLS_KRB5_WITH_RC4_128_SHA = 0x0020 |
| 118 |
TLS_KRB5_WITH_IDEA_CBC_SHA = 0x0021 |
| 119 |
TLS_KRB5_WITH_DES_CBC_MD5 = 0x0022 |
| 120 |
TLS_KRB5_WITH_3DES_EDE_CBC_MD5 = 0x0023 |
| 121 |
TLS_KRB5_WITH_RC4_128_MD5 = 0x0024 |
| 122 |
TLS_KRB5_WITH_IDEA_CBC_MD5 = 0x0025 |
| 123 |
TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA = 0x0026 |
| 124 |
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA = 0x0027 |
| 125 |
TLS_KRB5_EXPORT_WITH_RC4_40_SHA = 0x0028 |
| 126 |
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 = 0x0029 |
| 127 |
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 = 0x002A |
| 128 |
TLS_KRB5_EXPORT_WITH_RC4_40_MD5 = 0x002B |
| 129 |
TLS_PSK_WITH_NULL_SHA = 0x002C |
| 130 |
TLS_DHE_PSK_WITH_NULL_SHA = 0x002D |
| 131 |
TLS_RSA_PSK_WITH_NULL_SHA = 0x002E |
| 132 |
TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F |
| 133 |
TLS_DH_DSS_WITH_AES_128_CBC_SHA = 0x0030 |
| 134 |
TLS_DH_RSA_WITH_AES_128_CBC_SHA = 0x0031 |
| 135 |
TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032 |
| 136 |
TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033 |
| 137 |
TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x0034 |
| 138 |
TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035 |
| 139 |
TLS_DH_DSS_WITH_AES_256_CBC_SHA = 0x0036 |
| 140 |
TLS_DH_RSA_WITH_AES_256_CBC_SHA = 0x0037 |
| 141 |
TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x0038 |
| 142 |
TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039 |
| 143 |
TLS_DH_anon_WITH_AES_256_CBC_SHA = 0x003A |
| 144 |
TLS_RSA_WITH_NULL_SHA256 = 0x003B |
| 145 |
TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C |
| 146 |
TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D |
| 147 |
TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 0x003E |
| 148 |
TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 0x003F |
| 149 |
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x0040 |
| 150 |
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x0041 |
| 151 |
TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA = 0x0042 |
| 152 |
TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x0043 |
| 153 |
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA = 0x0044 |
| 154 |
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA = 0x0045 |
| 155 |
TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA = 0x0046 |
| 156 |
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067 |
| 157 |
TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 0x0068 |
| 158 |
TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 0x0069 |
| 159 |
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x006A |
| 160 |
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B |
| 161 |
TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 0x006C |
| 162 |
TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 0x006D |
| 163 |
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x0084 |
| 164 |
TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA = 0x0085 |
| 165 |
TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x0086 |
| 166 |
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA = 0x0087 |
| 167 |
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA = 0x0088 |
| 168 |
TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA = 0x0089 |
| 169 |
TLS_PSK_WITH_RC4_128_SHA = 0x008A |
| 170 |
TLS_PSK_WITH_3DES_EDE_CBC_SHA = 0x008B |
| 171 |
TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C |
| 172 |
TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D |
| 173 |
TLS_DHE_PSK_WITH_RC4_128_SHA = 0x008E |
| 174 |
TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 0x008F |
| 175 |
TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 0x0090 |
| 176 |
TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 0x0091 |
| 177 |
TLS_RSA_PSK_WITH_RC4_128_SHA = 0x0092 |
| 178 |
TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 0x0093 |
| 179 |
TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 0x0094 |
| 180 |
TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 0x0095 |
| 181 |
TLS_RSA_WITH_SEED_CBC_SHA = 0x0096 |
| 182 |
TLS_DH_DSS_WITH_SEED_CBC_SHA = 0x0097 |
| 183 |
TLS_DH_RSA_WITH_SEED_CBC_SHA = 0x0098 |
| 184 |
TLS_DHE_DSS_WITH_SEED_CBC_SHA = 0x0099 |
| 185 |
TLS_DHE_RSA_WITH_SEED_CBC_SHA = 0x009A |
| 186 |
TLS_DH_anon_WITH_SEED_CBC_SHA = 0x009B |
| 187 |
TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C |
| 188 |
TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D |
| 189 |
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E |
| 190 |
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F |
| 191 |
TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 0x00A0 |
| 192 |
TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 0x00A1 |
| 193 |
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 0x00A2 |
| 194 |
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 0x00A3 |
| 195 |
TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 0x00A4 |
| 196 |
TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 0x00A5 |
| 197 |
TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 0x00A6 |
| 198 |
TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 0x00A7 |
| 199 |
TLS_PSK_WITH_AES_128_GCM_SHA256 = 0x00A8 |
| 200 |
TLS_PSK_WITH_AES_256_GCM_SHA384 = 0x00A9 |
| 201 |
TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 0x00AA |
| 202 |
TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 0x00AB |
| 203 |
TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 0x00AC |
| 204 |
TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 0x00AD |
| 205 |
TLS_PSK_WITH_AES_128_CBC_SHA256 = 0x00AE |
| 206 |
TLS_PSK_WITH_AES_256_CBC_SHA384 = 0x00AF |
| 207 |
TLS_PSK_WITH_NULL_SHA256 = 0x00B0 |
| 208 |
TLS_PSK_WITH_NULL_SHA384 = 0x00B1 |
| 209 |
TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 0x00B2 |
| 210 |
TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 0x00B3 |
| 211 |
TLS_DHE_PSK_WITH_NULL_SHA256 = 0x00B4 |
| 212 |
TLS_DHE_PSK_WITH_NULL_SHA384 = 0x00B5 |
| 213 |
TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 0x00B6 |
| 214 |
TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 0x00B7 |
| 215 |
TLS_RSA_PSK_WITH_NULL_SHA256 = 0x00B8 |
| 216 |
TLS_RSA_PSK_WITH_NULL_SHA384 = 0x00B9 |
| 217 |
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BA |
| 218 |
TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BB |
| 219 |
TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BC |
| 220 |
TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BD |
| 221 |
TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BE |
| 222 |
TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 = 0x00BF |
| 223 |
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C0 |
| 224 |
TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C1 |
| 225 |
TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C2 |
| 226 |
TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C3 |
| 227 |
TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C4 |
| 228 |
TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 = 0x00C5 |
| 229 |
TLS_SM4_GCM_SM3 = 0x00C6 |
| 230 |
TLS_SM4_CCM_SM3 = 0x00C7 |
| 231 |
TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF |
| 232 |
TLS_AES_128_GCM_SHA256 = 0x1301 |
| 233 |
TLS_AES_256_GCM_SHA384 = 0x1302 |
| 234 |
TLS_CHACHA20_POLY1305_SHA256 = 0x1303 |
| 235 |
TLS_AES_128_CCM_SHA256 = 0x1304 |
| 236 |
TLS_AES_128_CCM_8_SHA256 = 0x1305 |
| 237 |
TLS_FALLBACK_SCSV = 0x5600 |
| 238 |
TLS_ECDH_ECDSA_WITH_NULL_SHA = 0xC001 |
| 239 |
TLS_ECDH_ECDSA_WITH_RC4_128_SHA = 0xC002 |
| 240 |
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = 0xC003 |
| 241 |
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = 0xC004 |
| 242 |
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = 0xC005 |
| 243 |
TLS_ECDHE_ECDSA_WITH_NULL_SHA = 0xC006 |
| 244 |
TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = 0xC007 |
| 245 |
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = 0xC008 |
| 246 |
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009 |
| 247 |
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A |
| 248 |
TLS_ECDH_RSA_WITH_NULL_SHA = 0xC00B |
| 249 |
TLS_ECDH_RSA_WITH_RC4_128_SHA = 0xC00C |
| 250 |
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = 0xC00D |
| 251 |
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = 0xC00E |
| 252 |
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = 0xC00F |
| 253 |
TLS_ECDHE_RSA_WITH_NULL_SHA = 0xC010 |
| 254 |
TLS_ECDHE_RSA_WITH_RC4_128_SHA = 0xC011 |
| 255 |
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = 0xC012 |
| 256 |
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013 |
| 257 |
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014 |
| 258 |
TLS_ECDH_anon_WITH_NULL_SHA = 0xC015 |
| 259 |
TLS_ECDH_anon_WITH_RC4_128_SHA = 0xC016 |
| 260 |
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = 0xC017 |
| 261 |
TLS_ECDH_anon_WITH_AES_128_CBC_SHA = 0xC018 |
| 262 |
TLS_ECDH_anon_WITH_AES_256_CBC_SHA = 0xC019 |
| 263 |
TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA = 0xC01A |
| 264 |
TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA = 0xC01B |
| 265 |
TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA = 0xC01C |
| 266 |
TLS_SRP_SHA_WITH_AES_128_CBC_SHA = 0xC01D |
| 267 |
TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA = 0xC01E |
| 268 |
TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA = 0xC01F |
| 269 |
TLS_SRP_SHA_WITH_AES_256_CBC_SHA = 0xC020 |
| 270 |
TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA = 0xC021 |
| 271 |
TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA = 0xC022 |
| 272 |
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC023 |
| 273 |
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC024 |
| 274 |
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC025 |
| 275 |
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC026 |
| 276 |
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0xC027 |
| 277 |
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0xC028 |
| 278 |
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = 0xC029 |
| 279 |
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = 0xC02A |
| 280 |
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B |
| 281 |
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C |
| 282 |
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02D |
| 283 |
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02E |
| 284 |
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F |
| 285 |
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030 |
| 286 |
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0xC031 |
| 287 |
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0xC032 |
| 288 |
TLS_ECDHE_PSK_WITH_RC4_128_SHA = 0xC033 |
| 289 |
TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA = 0xC034 |
| 290 |
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035 |
| 291 |
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036 |
| 292 |
TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 = 0xC037 |
| 293 |
TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 = 0xC038 |
| 294 |
TLS_ECDHE_PSK_WITH_NULL_SHA = 0xC039 |
| 295 |
TLS_ECDHE_PSK_WITH_NULL_SHA256 = 0xC03A |
| 296 |
TLS_ECDHE_PSK_WITH_NULL_SHA384 = 0xC03B |
| 297 |
TLS_RSA_WITH_ARIA_128_CBC_SHA256 = 0xC03C |
| 298 |
TLS_RSA_WITH_ARIA_256_CBC_SHA384 = 0xC03D |
| 299 |
TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 = 0xC03E |
| 300 |
TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 = 0xC03F |
| 301 |
TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 = 0xC040 |
| 302 |
TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 = 0xC041 |
| 303 |
TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 = 0xC042 |
| 304 |
TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 = 0xC043 |
| 305 |
TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 = 0xC044 |
| 306 |
TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 = 0xC045 |
| 307 |
TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 = 0xC046 |
| 308 |
TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 = 0xC047 |
| 309 |
TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 = 0xC048 |
| 310 |
TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 = 0xC049 |
| 311 |
TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 = 0xC04A |
| 312 |
TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 = 0xC04B |
| 313 |
TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 = 0xC04C |
| 314 |
TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 = 0xC04D |
| 315 |
TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 = 0xC04E |
| 316 |
TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 = 0xC04F |
| 317 |
TLS_RSA_WITH_ARIA_128_GCM_SHA256 = 0xC050 |
| 318 |
TLS_RSA_WITH_ARIA_256_GCM_SHA384 = 0xC051 |
| 319 |
TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 = 0xC052 |
| 320 |
TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 = 0xC053 |
| 321 |
TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 = 0xC054 |
| 322 |
TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 = 0xC055 |
| 323 |
TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 = 0xC056 |
| 324 |
TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 = 0xC057 |
| 325 |
TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 = 0xC058 |
| 326 |
TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 = 0xC059 |
| 327 |
TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 = 0xC05A |
| 328 |
TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 = 0xC05B |
| 329 |
TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 = 0xC05C |
| 330 |
TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 = 0xC05D |
| 331 |
TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 = 0xC05E |
| 332 |
TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 = 0xC05F |
| 333 |
TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 = 0xC060 |
| 334 |
TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 = 0xC061 |
| 335 |
TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 = 0xC062 |
| 336 |
TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 = 0xC063 |
| 337 |
TLS_PSK_WITH_ARIA_128_CBC_SHA256 = 0xC064 |
| 338 |
TLS_PSK_WITH_ARIA_256_CBC_SHA384 = 0xC065 |
| 339 |
TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 = 0xC066 |
| 340 |
TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 = 0xC067 |
| 341 |
TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 = 0xC068 |
| 342 |
TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 = 0xC069 |
| 343 |
TLS_PSK_WITH_ARIA_128_GCM_SHA256 = 0xC06A |
| 344 |
TLS_PSK_WITH_ARIA_256_GCM_SHA384 = 0xC06B |
| 345 |
TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 = 0xC06C |
| 346 |
TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 = 0xC06D |
| 347 |
TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 = 0xC06E |
| 348 |
TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 = 0xC06F |
| 349 |
TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 = 0xC070 |
| 350 |
TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 = 0xC071 |
| 351 |
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xC072 |
| 352 |
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 = 0xC073 |
| 353 |
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xC074 |
| 354 |
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 = 0xC075 |
| 355 |
TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xC076 |
| 356 |
TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 = 0xC077 |
| 357 |
TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 = 0xC078 |
| 358 |
TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 = 0xC079 |
| 359 |
TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC07A |
| 360 |
TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC07B |
| 361 |
TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC07C |
| 362 |
TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC07D |
| 363 |
TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC07E |
| 364 |
TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC07F |
| 365 |
TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 = 0xC080 |
| 366 |
TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 = 0xC081 |
| 367 |
TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 = 0xC082 |
| 368 |
TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 = 0xC083 |
| 369 |
TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 = 0xC084 |
| 370 |
TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 = 0xC085 |
| 371 |
TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC086 |
| 372 |
TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC087 |
| 373 |
TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC088 |
| 374 |
TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC089 |
| 375 |
TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC08A |
| 376 |
TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC08B |
| 377 |
TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 = 0xC08C |
| 378 |
TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 = 0xC08D |
| 379 |
TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 = 0xC08E |
| 380 |
TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 = 0xC08F |
| 381 |
TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 = 0xC090 |
| 382 |
TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 = 0xC091 |
| 383 |
TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 = 0xC092 |
| 384 |
TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 = 0xC093 |
| 385 |
TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 = 0xC094 |
| 386 |
TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 = 0xC095 |
| 387 |
TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 = 0xC096 |
| 388 |
TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 = 0xC097 |
| 389 |
TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 = 0xC098 |
| 390 |
TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 = 0xC099 |
| 391 |
TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 = 0xC09A |
| 392 |
TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 = 0xC09B |
| 393 |
TLS_RSA_WITH_AES_128_CCM = 0xC09C |
| 394 |
TLS_RSA_WITH_AES_256_CCM = 0xC09D |
| 395 |
TLS_DHE_RSA_WITH_AES_128_CCM = 0xC09E |
| 396 |
TLS_DHE_RSA_WITH_AES_256_CCM = 0xC09F |
| 397 |
TLS_RSA_WITH_AES_128_CCM_8 = 0xC0A0 |
| 398 |
TLS_RSA_WITH_AES_256_CCM_8 = 0xC0A1 |
| 399 |
TLS_DHE_RSA_WITH_AES_128_CCM_8 = 0xC0A2 |
| 400 |
TLS_DHE_RSA_WITH_AES_256_CCM_8 = 0xC0A3 |
| 401 |
TLS_PSK_WITH_AES_128_CCM = 0xC0A4 |
| 402 |
TLS_PSK_WITH_AES_256_CCM = 0xC0A5 |
| 403 |
TLS_DHE_PSK_WITH_AES_128_CCM = 0xC0A6 |
| 404 |
TLS_DHE_PSK_WITH_AES_256_CCM = 0xC0A7 |
| 405 |
TLS_PSK_WITH_AES_128_CCM_8 = 0xC0A8 |
| 406 |
TLS_PSK_WITH_AES_256_CCM_8 = 0xC0A9 |
| 407 |
TLS_PSK_DHE_WITH_AES_128_CCM_8 = 0xC0AA |
| 408 |
TLS_PSK_DHE_WITH_AES_256_CCM_8 = 0xC0AB |
| 409 |
TLS_ECDHE_ECDSA_WITH_AES_128_CCM = 0xC0AC |
| 410 |
TLS_ECDHE_ECDSA_WITH_AES_256_CCM = 0xC0AD |
| 411 |
TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 = 0xC0AE |
| 412 |
TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 = 0xC0AF |
| 413 |
TLS_ECCPWD_WITH_AES_128_GCM_SHA256 = 0xC0B0 |
| 414 |
TLS_ECCPWD_WITH_AES_256_GCM_SHA384 = 0xC0B1 |
| 415 |
TLS_ECCPWD_WITH_AES_128_CCM_SHA256 = 0xC0B2 |
| 416 |
TLS_ECCPWD_WITH_AES_256_CCM_SHA384 = 0xC0B3 |
| 417 |
TLS_SHA256_SHA256 = 0xC0B4 |
| 418 |
TLS_SHA384_SHA384 = 0xC0B5 |
| 419 |
TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC = 0xC100 |
| 420 |
TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC = 0xC101 |
| 421 |
TLS_GOSTR341112_256_WITH_28147_CNT_IMIT = 0xC102 |
| 422 |
TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_L = 0xC103 |
| 423 |
TLS_GOSTR341112_256_WITH_MAGMA_MGM_L = 0xC104 |
| 424 |
TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_S = 0xC105 |
| 425 |
TLS_GOSTR341112_256_WITH_MAGMA_MGM_S = 0xC106 |
| 426 |
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8 |
| 427 |
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9 |
| 428 |
TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAA |
| 429 |
TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAB |
| 430 |
TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAC |
| 431 |
TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAD |
| 432 |
TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAE |
| 433 |
TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256 = 0xD001 |
| 434 |
TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384 = 0xD002 |
| 435 |
TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256 = 0xD003 |
| 436 |
TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256 = 0xD005 |
| 437 |
|
| 438 |
@classmethod |
| 439 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 440 |
return _add_missing_enum_member(cls, value, "Unknown Cipher Suite 0x{0:04X}") |
| 441 |
|
| 442 |
|
| 443 |
class TlsCompressionMethod(enum.IntEnum): |
| 444 |
none = 0 |
| 445 |
deflate = 1 |
| 446 |
lzs = 64 |
| 447 |
|
| 448 |
@classmethod |
| 449 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 450 |
return _add_missing_enum_member(cls, value, "Unknown Compression Method 0x{0:02X}") |
| 451 |
|
| 452 |
|
| 453 |
class TlsExtensionType(enum.IntEnum): |
| 454 |
server_name = 0 |
| 455 |
max_fragment_length = 1 |
| 456 |
client_certificate_url = 2 |
| 457 |
trusted_ca_keys = 3 |
| 458 |
truncated_hmac = 4 |
| 459 |
status_request = 5 |
| 460 |
user_mapping = 6 |
| 461 |
client_authz = 7 |
| 462 |
server_authz = 8 |
| 463 |
cert_type = 9 |
| 464 |
supported_groups = 10 |
| 465 |
ec_point_formats = 11 |
| 466 |
srp = 12 |
| 467 |
signature_algorithms = 13 |
| 468 |
use_srtp = 14 |
| 469 |
heartbeat = 15 |
| 470 |
application_layer_protocol_negotiation = 16 |
| 471 |
status_request_v2 = 17 |
| 472 |
signed_certificate_timestamp = 18 |
| 473 |
client_certificate_type = 19 |
| 474 |
server_certificate_type = 20 |
| 475 |
padding = 21 |
| 476 |
encrypt_then_mac = 22 |
| 477 |
extended_master_secret = 23 |
| 478 |
token_binding = 24 |
| 479 |
cached_info = 25 |
| 480 |
tls_lts = 26 |
| 481 |
compress_certificate = 27 |
| 482 |
record_size_limit = 28 |
| 483 |
pwd_protect = 29 |
| 484 |
pwd_clear = 30 |
| 485 |
password_salt = 31 |
| 486 |
ticket_pinning = 32 |
| 487 |
tls_cert_with_extern_psk = 33 |
| 488 |
delegated_credentials = 34 |
| 489 |
session_ticket = 35 |
| 490 |
TLMSP = 36 |
| 491 |
TLMSP_proxying = 37 |
| 492 |
TLMSP_delegate = 38 |
| 493 |
supported_ekt_ciphers = 39 |
| 494 |
pre_shared_key = 41 |
| 495 |
early_data = 42 |
| 496 |
supported_versions = 43 |
| 497 |
cookie = 44 |
| 498 |
psk_key_exchange_modes = 45 |
| 499 |
certificate_authorities = 47 |
| 500 |
oid_filters = 48 |
| 501 |
post_handshake_auth = 49 |
| 502 |
signature_algorithms_cert = 50 |
| 503 |
key_share = 51 |
| 504 |
transparency_info = 52 |
| 505 |
connection_id_deprecated = 53 |
| 506 |
connection_id = 54 |
| 507 |
external_id_hash = 55 |
| 508 |
external_session_id = 56 |
| 509 |
quic_transport_parameters = 57 |
| 510 |
ticket_request = 58 |
| 511 |
dnssec_chain = 69 |
| 512 |
renegotiation_info = 65281 |
| 513 |
|
| 514 |
@classmethod |
| 515 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 516 |
return _add_missing_enum_member(cls, value, "Unknown Extension Type 0x{0:04X}") |
| 517 |
|
| 518 |
|
| 519 |
class TlsServerNameType(enum.IntEnum): |
| 520 |
server_name = 0 |
| 521 |
|
| 522 |
@classmethod |
| 523 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 524 |
return _add_missing_enum_member(cls, value, "Unknown Server Name Type 0x{0:02X}") |
| 525 |
|
| 526 |
|
| 527 |
class TlsECPointFormat(enum.IntEnum): |
| 528 |
uncompressed = 0 |
| 529 |
ansiX962_compressed_prime = 1 |
| 530 |
ansiX962_compressed_char2 = 2 |
| 531 |
|
| 532 |
@classmethod |
| 533 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 534 |
return _add_missing_enum_member(cls, value, "Unknown EC Point Format 0x{0:02X}") |
| 535 |
|
| 536 |
|
| 537 |
class TlsSupportedGroup(enum.IntEnum): |
| 538 |
reserved = 0 |
| 539 |
sect163k1 = 1 |
| 540 |
sect163r1 = 2 |
| 541 |
sect163r2 = 3 |
| 542 |
sect193r1 = 4 |
| 543 |
sect193r2 = 5 |
| 544 |
sect233k1 = 6 |
| 545 |
sect233r1 = 7 |
| 546 |
sect239k1 = 8 |
| 547 |
sect283k1 = 9 |
| 548 |
sect283r1 = 10 |
| 549 |
sect409k1 = 11 |
| 550 |
sect409r1 = 12 |
| 551 |
sect571k1 = 13 |
| 552 |
sect571r1 = 14 |
| 553 |
secp160k1 = 15 |
| 554 |
secp160r1 = 16 |
| 555 |
secp160r2 = 17 |
| 556 |
secp192k1 = 18 |
| 557 |
secp192r1 = 19 |
| 558 |
secp224k1 = 20 |
| 559 |
secp224r1 = 21 |
| 560 |
secp256k1 = 22 |
| 561 |
secp256r1 = 23 |
| 562 |
secp384r1 = 24 |
| 563 |
secp521r1 = 25 |
| 564 |
brainpoolP256r1 = 26 |
| 565 |
brainpoolP384r1 = 27 |
| 566 |
brainpoolP512r1 = 28 |
| 567 |
x25519 = 29 |
| 568 |
x448 = 30 |
| 569 |
brainpoolP256r1tls13 = 31 |
| 570 |
brainpoolP384r1tls13 = 32 |
| 571 |
brainpoolP512r1tls13 = 33 |
| 572 |
GC256A = 34 |
| 573 |
GC256B = 35 |
| 574 |
GC256C = 36 |
| 575 |
GC256D = 37 |
| 576 |
GC512A = 38 |
| 577 |
GC512B = 39 |
| 578 |
GC512C = 40 |
| 579 |
curveSM2 = 41 |
| 580 |
ffdhe2048 = 256 |
| 581 |
ffdhe3072 = 257 |
| 582 |
ffdhe4096 = 258 |
| 583 |
ffdhe6144 = 259 |
| 584 |
ffdhe8192 = 260 |
| 585 |
arbitrary_explicit_prime_curves = 65281 |
| 586 |
arbitrary_explicit_char2_curves = 65282 |
| 587 |
|
| 588 |
@classmethod |
| 589 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 590 |
return _add_missing_enum_member(cls, value, "Unknown Supported Group 0x{0:04X}") |
| 591 |
|
| 592 |
|
| 593 |
class TlsSignatureScheme(enum.IntEnum): |
| 594 |
rsa_pkcs1_sha1 = 0x0201 |
| 595 |
dsa_sha1 = 0x0202 |
| 596 |
ecdsa_sha1 = 0x0203 |
| 597 |
sha224_rsa = 0x0301 |
| 598 |
dsa_sha224 = 0x0302 |
| 599 |
sha224_ecdsa = 0x0303 |
| 600 |
rsa_pkcs1_sha256 = 0x0401 |
| 601 |
dsa_sha256 = 0x0402 |
| 602 |
ecdsa_secp256r1_sha256 = 0x0403 |
| 603 |
rsa_pkcs1_sha256_legacy = 0x0420 |
| 604 |
rsa_pkcs1_sha384 = 0x0501 |
| 605 |
dsa_sha384 = 0x0502 |
| 606 |
ecdsa_secp384r1_sha384 = 0x0503 |
| 607 |
rsa_pkcs1_sha384_legacy = 0x0520 |
| 608 |
rsa_pkcs1_sha512 = 0x0601 |
| 609 |
dsa_sha512 = 0x0602 |
| 610 |
ecdsa_secp521r1_sha512 = 0x0603 |
| 611 |
rsa_pkcs1_sha512_legacy = 0x0620 |
| 612 |
eccsi_sha256 = 0x0704 |
| 613 |
iso_ibs1 = 0x0705 |
| 614 |
iso_ibs2 = 0x0706 |
| 615 |
iso_chinese_ibs = 0x0707 |
| 616 |
sm2sig_sm3 = 0x0708 |
| 617 |
gostr34102012_256a = 0x0709 |
| 618 |
gostr34102012_256b = 0x070A |
| 619 |
gostr34102012_256c = 0x070B |
| 620 |
gostr34102012_256d = 0x070C |
| 621 |
gostr34102012_512a = 0x070D |
| 622 |
gostr34102012_512b = 0x070E |
| 623 |
gostr34102012_512c = 0x070F |
| 624 |
rsa_pss_rsae_sha256 = 0x0804 |
| 625 |
rsa_pss_rsae_sha384 = 0x0805 |
| 626 |
rsa_pss_rsae_sha512 = 0x0806 |
| 627 |
ed25519 = 0x0807 |
| 628 |
ed448 = 0x0808 |
| 629 |
rsa_pss_pss_sha256 = 0x0809 |
| 630 |
rsa_pss_pss_sha384 = 0x080A |
| 631 |
rsa_pss_pss_sha512 = 0x080B |
| 632 |
ecdsa_brainpoolP256r1tls13_sha256 = 0x081A |
| 633 |
ecdsa_brainpoolP384r1tls13_sha384 = 0x081B |
| 634 |
ecdsa_brainpoolP512r1tls13_sha512 = 0x081C |
| 635 |
|
| 636 |
@classmethod |
| 637 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 638 |
return _add_missing_enum_member(cls, value, "Unknown Signature Scheme 0x{0:04X}") |
| 639 |
|
| 640 |
|
| 641 |
class TlsPskKeyExchangeMode(enum.IntEnum): |
| 642 |
psk_ke = 0 |
| 643 |
psk_dhe_ke = 1 |
| 644 |
|
| 645 |
@classmethod |
| 646 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 647 |
return _add_missing_enum_member(cls, value, "Unknown PSK Key Exchange Mode 0x{0:02X}") |
| 648 |
|
| 649 |
|
| 650 |
class TlsECCurveType(enum.IntEnum): |
| 651 |
unassigned = 0 |
| 652 |
explicit_primve = 1 |
| 653 |
explicit_char2 = 2 |
| 654 |
named_curve = 3 |
| 655 |
|
| 656 |
@classmethod |
| 657 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 658 |
return _add_missing_enum_member(cls, value, "Unknown EC Curve Type 0x{0:02X}") |
| 659 |
|
| 660 |
|
| 661 |
class TlsClientCertificateType(enum.IntEnum): |
| 662 |
rsa_sign = 1 |
| 663 |
dss_sign = 2 |
| 664 |
rsa_fixed_dh = 3 |
| 665 |
dss_fixed_dh = 4 |
| 666 |
rsa_ephemeral_dh = 5 |
| 667 |
dss_ephemeral_dh = 6 |
| 668 |
fortezza_dms = 20 |
| 669 |
ecdsa_sign = 64 |
| 670 |
rsa_fixed_ecdh = 65 |
| 671 |
ecdsa_fixed_ecdh = 66 |
| 672 |
gost_sign256 = 67 |
| 673 |
gost_sign512 = 68 |
| 674 |
|
| 675 |
@classmethod |
| 676 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 677 |
return _add_missing_enum_member(cls, value, "Unknown Client Certificate Type 0x{0:02X}") |
| 678 |
|
| 679 |
|
| 680 |
class DistinguishedNameType(str, enum.Enum): |
| 681 |
object_class = "2.5.4.0" |
| 682 |
aliased_entry_name = "2.5.4.1" |
| 683 |
knowledge_information = "2.5.4.2" |
| 684 |
common_name = "2.5.4.3" |
| 685 |
surname = "2.5.4.4" |
| 686 |
serial_number = "2.5.4.5" |
| 687 |
country_name = "2.5.4.6" |
| 688 |
locality_name = "2.5.4.7" |
| 689 |
state_or_province_name = "2.5.4.8" |
| 690 |
street_address = "2.5.4.9" |
| 691 |
organizational_name = "2.5.4.10" |
| 692 |
organizational_unit_name = "2.5.4.11" |
| 693 |
id_title = "2.5.4.12" |
| 694 |
description = "2.5.4.13" |
| 695 |
search_guide = "2.5.4.14" |
| 696 |
business_category = "2.5.4.15" |
| 697 |
postal_address = "2.5.4.16" |
| 698 |
postal_code = "2.5.4.17" |
| 699 |
post_office_box = "2.5.4.18" |
| 700 |
physical_delivery_office_name = "2.5.4.19" |
| 701 |
telephone_number = "2.5.4.20" |
| 702 |
telex_number = "2.5.4.21" |
| 703 |
teletex_terminal_identifier = "2.5.4.22" |
| 704 |
facsimile_telephone_number = "2.5.4.23" |
| 705 |
x121_address = "2.5.4.24" |
| 706 |
international_isdn_number = "2.5.4.25" |
| 707 |
registered_address = "2.5.4.26" |
| 708 |
destination_indicator = "2.5.4.27" |
| 709 |
preferred_delivery_method = "2.5.4.28" |
| 710 |
presentation_address = "2.5.4.29" |
| 711 |
supported_application_context = "2.5.4.30" |
| 712 |
member = "2.5.4.31" |
| 713 |
owner = "2.5.4.32" |
| 714 |
role_occupant = "2.5.4.33" |
| 715 |
see_also = "2.5.4.34" |
| 716 |
user_password = "2.5.4.35" |
| 717 |
user_certificate = "2.5.4.36" |
| 718 |
ca_certificate = "2.5.4.37" |
| 719 |
authority_revocation_list = "2.5.4.38" |
| 720 |
certificate_revocation_list = "2.5.4.39" |
| 721 |
cross_certificate_pair = "2.5.4.40" |
| 722 |
id_name = "2.5.4.41" |
| 723 |
given_name = "2.5.4.42" |
| 724 |
initials = "2.5.4.43" |
| 725 |
generation_qualifier = "2.5.4.44" |
| 726 |
unique_identifier = "2.5.4.45" |
| 727 |
dn_qualifier = "2.5.4.46" |
| 728 |
enhanced_search_guide = "2.5.4.47" |
| 729 |
protocol_information = "2.5.4.48" |
| 730 |
distinguished_name = "2.5.4.49" |
| 731 |
unique_member = "2.5.4.50" |
| 732 |
house_identifier = "2.5.4.51" |
| 733 |
supported_algorithms = "2.5.4.52" |
| 734 |
delta_revocation_list = "2.5.4.53" |
| 735 |
attribute_certificate = "2.5.4.58" |
| 736 |
pseudonym = "2.5.4.65" |
| 737 |
|
| 738 |
@classmethod |
| 739 |
def _missing_(cls, value: object) -> typing.Optional[enum.Enum]: |
| 740 |
new_member = str.__new__(cls) |
| 741 |
new_member._name_ = f"Unknown DN OID Type {value}" |
| 742 |
new_member._value_ = str(value) |
| 743 |
return cls._value2member_map_.setdefault(value, new_member) |
| 744 |
|
| 745 |
@classmethod |
| 746 |
def native_labels(cls) -> typing.Dict["DistinguishedNameType", str]: |
| 747 |
return { |
| 748 |
DistinguishedNameType.object_class: "id-at-objectClass", |
| 749 |
DistinguishedNameType.aliased_entry_name: "id-at-aliasedEntryName", |
| 750 |
DistinguishedNameType.knowledge_information: "id-at-knowldgeinformation", |
| 751 |
DistinguishedNameType.common_name: "id-at-commonName", |
| 752 |
DistinguishedNameType.surname: "id-at-surname", |
| 753 |
DistinguishedNameType.serial_number: "id-at-serialNumber", |
| 754 |
DistinguishedNameType.country_name: "id-at-countryName", |
| 755 |
DistinguishedNameType.locality_name: "id-at-localityName", |
| 756 |
DistinguishedNameType.state_or_province_name: "id-at-stateOrProvinceName", |
| 757 |
DistinguishedNameType.street_address: "id-at-streetAddress", |
| 758 |
DistinguishedNameType.organizational_name: "id-at-organizationName", |
| 759 |
DistinguishedNameType.organizational_unit_name: "id-at-organizationalUnitName", |
| 760 |
DistinguishedNameType.id_title: "id-at-title", |
| 761 |
DistinguishedNameType.description: "id-at-description", |
| 762 |
DistinguishedNameType.search_guide: "id-at-searchGuide", |
| 763 |
DistinguishedNameType.business_category: "id-at-businessCategory", |
| 764 |
DistinguishedNameType.postal_address: "id-at-postalAddress", |
| 765 |
DistinguishedNameType.postal_code: "id-at-postalCode", |
| 766 |
DistinguishedNameType.post_office_box: "id-at-postOfficeBox", |
| 767 |
DistinguishedNameType.physical_delivery_office_name: "id-at-physicalDeliveryOfficeName", |
| 768 |
DistinguishedNameType.telephone_number: "id-at-telephoneNumber", |
| 769 |
DistinguishedNameType.telex_number: "id-at-telexNumber", |
| 770 |
DistinguishedNameType.teletex_terminal_identifier: "id-at-teletexTerminalIdentifier", |
| 771 |
DistinguishedNameType.facsimile_telephone_number: "id-at-facsimileTelephoneNumber", |
| 772 |
DistinguishedNameType.x121_address: "id-at-x121Address", |
| 773 |
DistinguishedNameType.international_isdn_number: "id-at-internationalISDNNumber", |
| 774 |
DistinguishedNameType.registered_address: "id-at-registeredAddress", |
| 775 |
DistinguishedNameType.destination_indicator: "id-at-destinationIndicator", |
| 776 |
DistinguishedNameType.preferred_delivery_method: "id-at-preferredDeliveryMethod", |
| 777 |
DistinguishedNameType.presentation_address: "id-at-presentationAddress", |
| 778 |
DistinguishedNameType.supported_application_context: "id-at-supportedApplicationContext", |
| 779 |
DistinguishedNameType.member: "id-at-member", |
| 780 |
DistinguishedNameType.owner: "id-at-owner", |
| 781 |
DistinguishedNameType.role_occupant: "id-at-roleOccupant", |
| 782 |
DistinguishedNameType.see_also: "id-at-seeAlso", |
| 783 |
DistinguishedNameType.user_password: "id-at-userPassword", |
| 784 |
DistinguishedNameType.user_certificate: "id-at-userCertificate", |
| 785 |
DistinguishedNameType.ca_certificate: "id-at-cACertificate", |
| 786 |
DistinguishedNameType.authority_revocation_list: "id-at-authorityRevocationList", |
| 787 |
DistinguishedNameType.certificate_revocation_list: "id-at-certificateRevocationList", |
| 788 |
DistinguishedNameType.cross_certificate_pair: "id-at-crossCertificatePair", |
| 789 |
DistinguishedNameType.id_name: "id-at-name", |
| 790 |
DistinguishedNameType.given_name: "id-at-givenName", |
| 791 |
DistinguishedNameType.initials: "id-at-initials", |
| 792 |
DistinguishedNameType.generation_qualifier: "id-at-generationQualifier", |
| 793 |
DistinguishedNameType.unique_identifier: "id-at-uniqueIdentifier", |
| 794 |
DistinguishedNameType.dn_qualifier: "id-at-dnQualifier", |
| 795 |
DistinguishedNameType.enhanced_search_guide: "id-at-enhancedSearchGuide", |
| 796 |
DistinguishedNameType.protocol_information: "id-at-protocolInformation", |
| 797 |
DistinguishedNameType.distinguished_name: "id-at-distinguishedName", |
| 798 |
DistinguishedNameType.unique_member: "id-at-uniqueMember", |
| 799 |
DistinguishedNameType.house_identifier: "id-at-houseIdentifier", |
| 800 |
DistinguishedNameType.supported_algorithms: "id-at-supportedAlgorithms", |
| 801 |
DistinguishedNameType.delta_revocation_list: "id-at-deltaRevocationList", |
| 802 |
DistinguishedNameType.attribute_certificate: "id-at-attributeCertificate", |
| 803 |
DistinguishedNameType.pseudonym: "id-at-pseudonym", |
| 804 |
} |