cosmopolitan/third_party/mbedtls/getciphersuitename.c
Justine Tunney 398f0c16fb Add SNI support to redbean and improve SSL perf
This change makes SSL virtual hosting possible. You can now load
multiple certificates for multiple domains and redbean will just
figure out which one to use, even if you only have 1 ip address.
You can also use a jumbo certificate that lists all your domains
in the the subject alternative names.

This change also makes performance improvements to MbedTLS. Here
are some benchmarks vs. cc1920749e

                                   BEFORE    AFTER   (microsecs)
suite_ssl.com                     2512881   191738 13.11x faster
suite_pkparse.com                   36291     3295 11.01x faster
suite_x509parse.com                854669   120293  7.10x faster
suite_pkwrite.com                    6549     1265  5.18x faster
suite_ecdsa.com                     53347    18778  2.84x faster
suite_pk.com                        49051    18717  2.62x faster
suite_ecdh.com                      19535     9502  2.06x faster
suite_shax.com                      15848     7965  1.99x faster
suite_rsa.com                      353257   184828  1.91x faster
suite_x509write.com                162646    85733  1.90x faster
suite_ecp.com                       20503    11050  1.86x faster
suite_hmac_drbg.no_reseed.com       19528    11417  1.71x faster
suite_hmac_drbg.nopr.com            12460     8010  1.56x faster
suite_mpi.com                      687124   442661  1.55x faster
suite_hmac_drbg.pr.com              11890     7752  1.53x faster

There aren't any special tricks to the performance imporvements.
It's mostly due to code cleanup, assembly and intel instructions
like mulx, adox, and adcx.
2021-07-23 13:56:13 -07:00

752 lines
26 KiB
C

/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:4;coding:utf-8 -*-│
│vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│
╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright The Mbed TLS Contributors │
│ │
│ Licensed under the Apache License, Version 2.0 (the "License"); │
│ you may not use this file except in compliance with the License. │
│ You may obtain a copy of the License at │
│ │
│ http://www.apache.org/licenses/LICENSE-2.0 │
│ │
│ Unless required by applicable law or agreed to in writing, software │
│ distributed under the License is distributed on an "AS IS" BASIS, │
│ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │
│ See the License for the specific language governing permissions and │
│ limitations under the License. │
╚─────────────────────────────────────────────────────────────────────────────*/
#include "third_party/mbedtls/iana.h"
const char *GetCipherSuiteName(uint16_t x) {
switch (x) {
case 0x0000:
return "TLS_NULL_WITH_NULL_NULL";
case 0x0001:
return "TLS_RSA_WITH_NULL_MD5";
case 0x0002:
return "TLS_RSA_WITH_NULL_SHA";
case 0x0003:
return "TLS_RSA_EXPORT_WITH_RC4_40_MD5";
case 0x0004:
return "TLS_RSA_WITH_RC4_128_MD5";
case 0x0005:
return "TLS_RSA_WITH_RC4_128_SHA";
case 0x0006:
return "TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5";
case 0x0007:
return "TLS_RSA_WITH_IDEA_CBC_SHA";
case 0x0008:
return "TLS_RSA_EXPORT_WITH_DES40_CBC_SHA";
case 0x0009:
return "TLS_RSA_WITH_DES_CBC_SHA";
case 0x000A:
return "TLS_RSA_WITH_3DES_EDE_CBC_SHA";
case 0x000B:
return "TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA";
case 0x000C:
return "TLS_DH_DSS_WITH_DES_CBC_SHA";
case 0x000D:
return "TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA";
case 0x000E:
return "TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA";
case 0x000F:
return "TLS_DH_RSA_WITH_DES_CBC_SHA";
case 0x0010:
return "TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA";
case 0x0011:
return "TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA";
case 0x0012:
return "TLS_DHE_DSS_WITH_DES_CBC_SHA";
case 0x0013:
return "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA";
case 0x0014:
return "TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA";
case 0x0015:
return "TLS_DHE_RSA_WITH_DES_CBC_SHA";
case 0x0016:
return "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA";
case 0x0017:
return "TLS_DH_anon_EXPORT_WITH_RC4_40_MD5";
case 0x0018:
return "TLS_DH_anon_WITH_RC4_128_MD5";
case 0x0019:
return "TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA";
case 0x001A:
return "TLS_DH_anon_WITH_DES_CBC_SHA";
case 0x001B:
return "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA";
case 0x001E:
return "TLS_KRB5_WITH_DES_CBC_SHA";
case 0x001F:
return "TLS_KRB5_WITH_3DES_EDE_CBC_SHA";
case 0x0020:
return "TLS_KRB5_WITH_RC4_128_SHA";
case 0x0021:
return "TLS_KRB5_WITH_IDEA_CBC_SHA";
case 0x0022:
return "TLS_KRB5_WITH_DES_CBC_MD5";
case 0x0023:
return "TLS_KRB5_WITH_3DES_EDE_CBC_MD5";
case 0x0024:
return "TLS_KRB5_WITH_RC4_128_MD5";
case 0x0025:
return "TLS_KRB5_WITH_IDEA_CBC_MD5";
case 0x0026:
return "TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA";
case 0x0027:
return "TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA";
case 0x0028:
return "TLS_KRB5_EXPORT_WITH_RC4_40_SHA";
case 0x0029:
return "TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5";
case 0x002A:
return "TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5";
case 0x002B:
return "TLS_KRB5_EXPORT_WITH_RC4_40_MD5";
case 0x002C:
return "TLS_PSK_WITH_NULL_SHA";
case 0x002D:
return "TLS_DHE_PSK_WITH_NULL_SHA";
case 0x002E:
return "TLS_RSA_PSK_WITH_NULL_SHA";
case 0x002F:
return "TLS_RSA_WITH_AES_128_CBC_SHA";
case 0x0030:
return "TLS_DH_DSS_WITH_AES_128_CBC_SHA";
case 0x0031:
return "TLS_DH_RSA_WITH_AES_128_CBC_SHA";
case 0x0032:
return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA";
case 0x0033:
return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA";
case 0x0034:
return "TLS_DH_anon_WITH_AES_128_CBC_SHA";
case 0x0035:
return "TLS_RSA_WITH_AES_256_CBC_SHA";
case 0x0036:
return "TLS_DH_DSS_WITH_AES_256_CBC_SHA";
case 0x0037:
return "TLS_DH_RSA_WITH_AES_256_CBC_SHA";
case 0x0038:
return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA";
case 0x0039:
return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA";
case 0x003A:
return "TLS_DH_anon_WITH_AES_256_CBC_SHA";
case 0x003B:
return "TLS_RSA_WITH_NULL_SHA256";
case 0x003C:
return "TLS_RSA_WITH_AES_128_CBC_SHA256";
case 0x003D:
return "TLS_RSA_WITH_AES_256_CBC_SHA256";
case 0x003E:
return "TLS_DH_DSS_WITH_AES_128_CBC_SHA256";
case 0x003F:
return "TLS_DH_RSA_WITH_AES_128_CBC_SHA256";
case 0x0040:
return "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256";
case 0x0041:
return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA";
case 0x0042:
return "TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA";
case 0x0043:
return "TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA";
case 0x0044:
return "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA";
case 0x0045:
return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA";
case 0x0046:
return "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA";
case 0x0067:
return "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256";
case 0x0068:
return "TLS_DH_DSS_WITH_AES_256_CBC_SHA256";
case 0x0069:
return "TLS_DH_RSA_WITH_AES_256_CBC_SHA256";
case 0x006A:
return "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256";
case 0x006B:
return "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256";
case 0x006C:
return "TLS_DH_anon_WITH_AES_128_CBC_SHA256";
case 0x006D:
return "TLS_DH_anon_WITH_AES_256_CBC_SHA256";
case 0x0084:
return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA";
case 0x0085:
return "TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA";
case 0x0086:
return "TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA";
case 0x0087:
return "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA";
case 0x0088:
return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA";
case 0x0089:
return "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA";
case 0x008A:
return "TLS_PSK_WITH_RC4_128_SHA";
case 0x008B:
return "TLS_PSK_WITH_3DES_EDE_CBC_SHA";
case 0x008C:
return "TLS_PSK_WITH_AES_128_CBC_SHA";
case 0x008D:
return "TLS_PSK_WITH_AES_256_CBC_SHA";
case 0x008E:
return "TLS_DHE_PSK_WITH_RC4_128_SHA";
case 0x008F:
return "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA";
case 0x0090:
return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA";
case 0x0091:
return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA";
case 0x0092:
return "TLS_RSA_PSK_WITH_RC4_128_SHA";
case 0x0093:
return "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA";
case 0x0094:
return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA";
case 0x0095:
return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA";
case 0x0096:
return "TLS_RSA_WITH_SEED_CBC_SHA";
case 0x0097:
return "TLS_DH_DSS_WITH_SEED_CBC_SHA";
case 0x0098:
return "TLS_DH_RSA_WITH_SEED_CBC_SHA";
case 0x0099:
return "TLS_DHE_DSS_WITH_SEED_CBC_SHA";
case 0x009A:
return "TLS_DHE_RSA_WITH_SEED_CBC_SHA";
case 0x009B:
return "TLS_DH_anon_WITH_SEED_CBC_SHA";
case 0x009C:
return "TLS_RSA_WITH_AES_128_GCM_SHA256";
case 0x009D:
return "TLS_RSA_WITH_AES_256_GCM_SHA384";
case 0x009E:
return "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256";
case 0x009F:
return "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384";
case 0x00A0:
return "TLS_DH_RSA_WITH_AES_128_GCM_SHA256";
case 0x00A1:
return "TLS_DH_RSA_WITH_AES_256_GCM_SHA384";
case 0x00A2:
return "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256";
case 0x00A3:
return "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384";
case 0x00A4:
return "TLS_DH_DSS_WITH_AES_128_GCM_SHA256";
case 0x00A5:
return "TLS_DH_DSS_WITH_AES_256_GCM_SHA384";
case 0x00A6:
return "TLS_DH_anon_WITH_AES_128_GCM_SHA256";
case 0x00A7:
return "TLS_DH_anon_WITH_AES_256_GCM_SHA384";
case 0x00A8:
return "TLS_PSK_WITH_AES_128_GCM_SHA256";
case 0x00A9:
return "TLS_PSK_WITH_AES_256_GCM_SHA384";
case 0x00AA:
return "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256";
case 0x00AB:
return "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384";
case 0x00AC:
return "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256";
case 0x00AD:
return "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384";
case 0x00AE:
return "TLS_PSK_WITH_AES_128_CBC_SHA256";
case 0x00AF:
return "TLS_PSK_WITH_AES_256_CBC_SHA384";
case 0x00B0:
return "TLS_PSK_WITH_NULL_SHA256";
case 0x00B1:
return "TLS_PSK_WITH_NULL_SHA384";
case 0x00B2:
return "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256";
case 0x00B3:
return "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384";
case 0x00B4:
return "TLS_DHE_PSK_WITH_NULL_SHA256";
case 0x00B5:
return "TLS_DHE_PSK_WITH_NULL_SHA384";
case 0x00B6:
return "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256";
case 0x00B7:
return "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384";
case 0x00B8:
return "TLS_RSA_PSK_WITH_NULL_SHA256";
case 0x00B9:
return "TLS_RSA_PSK_WITH_NULL_SHA384";
case 0x00BA:
return "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00BB:
return "TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00BC:
return "TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00BD:
return "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00BE:
return "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00BF:
return "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256";
case 0x00C0:
return "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C1:
return "TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C2:
return "TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C3:
return "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C4:
return "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C5:
return "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256";
case 0x00C6:
return "TLS_SM4_GCM_SM3";
case 0x00C7:
return "TLS_SM4_CCM_SM3";
case 0x00FF:
return "TLS_EMPTY_RENEGOTIATION_INFO_SCSV";
case 0x1301:
return "TLS_AES_128_GCM_SHA256";
case 0x1302:
return "TLS_AES_256_GCM_SHA384";
case 0x1303:
return "TLS_CHACHA20_POLY1305_SHA256";
case 0x1304:
return "TLS_AES_128_CCM_SHA256";
case 0x1305:
return "TLS_AES_128_CCM_8_SHA256";
case 0x5600:
return "TLS_FALLBACK_SCSV";
case 0xC001:
return "TLS_ECDH_ECDSA_WITH_NULL_SHA";
case 0xC002:
return "TLS_ECDH_ECDSA_WITH_RC4_128_SHA";
case 0xC003:
return "TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA";
case 0xC004:
return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA";
case 0xC005:
return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA";
case 0xC006:
return "TLS_ECDHE_ECDSA_WITH_NULL_SHA";
case 0xC007:
return "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA";
case 0xC008:
return "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA";
case 0xC009:
return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA";
case 0xC00A:
return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA";
case 0xC00B:
return "TLS_ECDH_RSA_WITH_NULL_SHA";
case 0xC00C:
return "TLS_ECDH_RSA_WITH_RC4_128_SHA";
case 0xC00D:
return "TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA";
case 0xC00E:
return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA";
case 0xC00F:
return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA";
case 0xC010:
return "TLS_ECDHE_RSA_WITH_NULL_SHA";
case 0xC011:
return "TLS_ECDHE_RSA_WITH_RC4_128_SHA";
case 0xC012:
return "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA";
case 0xC013:
return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA";
case 0xC014:
return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA";
case 0xC015:
return "TLS_ECDH_anon_WITH_NULL_SHA";
case 0xC016:
return "TLS_ECDH_anon_WITH_RC4_128_SHA";
case 0xC017:
return "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA";
case 0xC018:
return "TLS_ECDH_anon_WITH_AES_128_CBC_SHA";
case 0xC019:
return "TLS_ECDH_anon_WITH_AES_256_CBC_SHA";
case 0xC01A:
return "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA";
case 0xC01B:
return "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA";
case 0xC01C:
return "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA";
case 0xC01D:
return "TLS_SRP_SHA_WITH_AES_128_CBC_SHA";
case 0xC01E:
return "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA";
case 0xC01F:
return "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA";
case 0xC020:
return "TLS_SRP_SHA_WITH_AES_256_CBC_SHA";
case 0xC021:
return "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA";
case 0xC022:
return "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA";
case 0xC023:
return "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256";
case 0xC024:
return "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384";
case 0xC025:
return "TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256";
case 0xC026:
return "TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384";
case 0xC027:
return "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256";
case 0xC028:
return "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384";
case 0xC029:
return "TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256";
case 0xC02A:
return "TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384";
case 0xC02B:
return "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256";
case 0xC02C:
return "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384";
case 0xC02D:
return "TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256";
case 0xC02E:
return "TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384";
case 0xC02F:
return "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256";
case 0xC030:
return "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384";
case 0xC031:
return "TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256";
case 0xC032:
return "TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384";
case 0xC033:
return "TLS_ECDHE_PSK_WITH_RC4_128_SHA";
case 0xC034:
return "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA";
case 0xC035:
return "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA";
case 0xC036:
return "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA";
case 0xC037:
return "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256";
case 0xC038:
return "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384";
case 0xC039:
return "TLS_ECDHE_PSK_WITH_NULL_SHA";
case 0xC03A:
return "TLS_ECDHE_PSK_WITH_NULL_SHA256";
case 0xC03B:
return "TLS_ECDHE_PSK_WITH_NULL_SHA384";
case 0xC03C:
return "TLS_RSA_WITH_ARIA_128_CBC_SHA256";
case 0xC03D:
return "TLS_RSA_WITH_ARIA_256_CBC_SHA384";
case 0xC03E:
return "TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256";
case 0xC03F:
return "TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384";
case 0xC040:
return "TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256";
case 0xC041:
return "TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384";
case 0xC042:
return "TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256";
case 0xC043:
return "TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384";
case 0xC044:
return "TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256";
case 0xC045:
return "TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384";
case 0xC046:
return "TLS_DH_anon_WITH_ARIA_128_CBC_SHA256";
case 0xC047:
return "TLS_DH_anon_WITH_ARIA_256_CBC_SHA384";
case 0xC048:
return "TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256";
case 0xC049:
return "TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384";
case 0xC04A:
return "TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256";
case 0xC04B:
return "TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384";
case 0xC04C:
return "TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256";
case 0xC04D:
return "TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384";
case 0xC04E:
return "TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256";
case 0xC04F:
return "TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384";
case 0xC050:
return "TLS_RSA_WITH_ARIA_128_GCM_SHA256";
case 0xC051:
return "TLS_RSA_WITH_ARIA_256_GCM_SHA384";
case 0xC052:
return "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256";
case 0xC053:
return "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384";
case 0xC054:
return "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256";
case 0xC055:
return "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384";
case 0xC056:
return "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256";
case 0xC057:
return "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384";
case 0xC058:
return "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256";
case 0xC059:
return "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384";
case 0xC05A:
return "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256";
case 0xC05B:
return "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384";
case 0xC05C:
return "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256";
case 0xC05D:
return "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384";
case 0xC05E:
return "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256";
case 0xC05F:
return "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384";
case 0xC060:
return "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256";
case 0xC061:
return "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384";
case 0xC062:
return "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256";
case 0xC063:
return "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384";
case 0xC064:
return "TLS_PSK_WITH_ARIA_128_CBC_SHA256";
case 0xC065:
return "TLS_PSK_WITH_ARIA_256_CBC_SHA384";
case 0xC066:
return "TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256";
case 0xC067:
return "TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384";
case 0xC068:
return "TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256";
case 0xC069:
return "TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384";
case 0xC06A:
return "TLS_PSK_WITH_ARIA_128_GCM_SHA256";
case 0xC06B:
return "TLS_PSK_WITH_ARIA_256_GCM_SHA384";
case 0xC06C:
return "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256";
case 0xC06D:
return "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384";
case 0xC06E:
return "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256";
case 0xC06F:
return "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384";
case 0xC070:
return "TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256";
case 0xC071:
return "TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384";
case 0xC072:
return "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC073:
return "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC074:
return "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC075:
return "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC076:
return "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC077:
return "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC078:
return "TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC079:
return "TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC07A:
return "TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC07B:
return "TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC07C:
return "TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC07D:
return "TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC07E:
return "TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC07F:
return "TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC080:
return "TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC081:
return "TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC082:
return "TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC083:
return "TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC084:
return "TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC085:
return "TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC086:
return "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC087:
return "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC088:
return "TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC089:
return "TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC08A:
return "TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC08B:
return "TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC08C:
return "TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC08D:
return "TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC08E:
return "TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC08F:
return "TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC090:
return "TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC091:
return "TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC092:
return "TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256";
case 0xC093:
return "TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384";
case 0xC094:
return "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC095:
return "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC096:
return "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC097:
return "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC098:
return "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC099:
return "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC09A:
return "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256";
case 0xC09B:
return "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384";
case 0xC09C:
return "TLS_RSA_WITH_AES_128_CCM";
case 0xC09D:
return "TLS_RSA_WITH_AES_256_CCM";
case 0xC09E:
return "TLS_DHE_RSA_WITH_AES_128_CCM";
case 0xC09F:
return "TLS_DHE_RSA_WITH_AES_256_CCM";
case 0xC0A0:
return "TLS_RSA_WITH_AES_128_CCM_8";
case 0xC0A1:
return "TLS_RSA_WITH_AES_256_CCM_8";
case 0xC0A2:
return "TLS_DHE_RSA_WITH_AES_128_CCM_8";
case 0xC0A3:
return "TLS_DHE_RSA_WITH_AES_256_CCM_8";
case 0xC0A4:
return "TLS_PSK_WITH_AES_128_CCM";
case 0xC0A5:
return "TLS_PSK_WITH_AES_256_CCM";
case 0xC0A6:
return "TLS_DHE_PSK_WITH_AES_128_CCM";
case 0xC0A7:
return "TLS_DHE_PSK_WITH_AES_256_CCM";
case 0xC0A8:
return "TLS_PSK_WITH_AES_128_CCM_8";
case 0xC0A9:
return "TLS_PSK_WITH_AES_256_CCM_8";
case 0xC0AA:
return "TLS_PSK_DHE_WITH_AES_128_CCM_8";
case 0xC0AB:
return "TLS_PSK_DHE_WITH_AES_256_CCM_8";
case 0xC0AC:
return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM";
case 0xC0AD:
return "TLS_ECDHE_ECDSA_WITH_AES_256_CCM";
case 0xC0AE:
return "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8";
case 0xC0AF:
return "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8";
case 0xC0B0:
return "TLS_ECCPWD_WITH_AES_128_GCM_SHA256";
case 0xC0B1:
return "TLS_ECCPWD_WITH_AES_256_GCM_SHA384";
case 0xC0B2:
return "TLS_ECCPWD_WITH_AES_128_CCM_SHA256";
case 0xC0B3:
return "TLS_ECCPWD_WITH_AES_256_CCM_SHA384";
case 0xC0B4:
return "TLS_SHA256_SHA256";
case 0xC0B5:
return "TLS_SHA384_SHA384";
case 0xC100:
return "TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC";
case 0xC101:
return "TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC";
case 0xC102:
return "TLS_GOSTR341112_256_WITH_28147_CNT_IMIT";
case 0xC103:
return "TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_L";
case 0xC104:
return "TLS_GOSTR341112_256_WITH_MAGMA_MGM_L";
case 0xC105:
return "TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_S";
case 0xC106:
return "TLS_GOSTR341112_256_WITH_MAGMA_MGM_S";
case 0xCCA8:
return "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCA9:
return "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCAA:
return "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCAB:
return "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCAC:
return "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCAD:
return "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256";
case 0xCCAE:
return "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256";
case 0xD001:
return "TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256";
case 0xD002:
return "TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384";
case 0xD003:
return "TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256";
case 0xD005:
return "TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256";
case 0x0A0A:
case 0x1A1A:
case 0x2A2A:
case 0x3A3A:
case 0x4A4A:
case 0x5A5A:
case 0x6A6A:
case 0x7A7A:
case 0x8A8A:
case 0x9A9A:
case 0xAAAA:
case 0xBABA:
case 0xCACA:
case 0xDADA:
case 0xEAEA:
case 0xFAFA:
return "GREASE_RFC8701";
case 0x0047 ... 0x004F:
case 0x0050 ... 0x0058:
case 0x0059 ... 0x005C:
case 0x0060 ... 0x0066:
case 0xFEFE ... 0xFEFF:
return "RESERVED_NO_CONFLICT";
case 0x001C ... 0x001D:
return "RESERVED_SSLV3_RFC5246";
case 0xFF00 ... 0xFFFF:
return "PRIVATE_USE_RFC8446";
default:
return "UNASSIGNED";
}
}