Created
November 21, 2016 03:46
-
-
Save R3TSU/2480235932e47317104e98faea0f038a to your computer and use it in GitHub Desktop.
Cipher list constant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/curl/curl/blob/master/lib/vtls/nss.c | |
http://www.theblog.ca/converting-php-curl-ssl-tls-cipher-names | |
static const cipher_s cipherlist[] = { | |
/* SSL2 cipher suites */ | |
{"rc4", SSL_EN_RC4_128_WITH_MD5}, | |
{"rc4-md5", SSL_EN_RC4_128_WITH_MD5}, | |
{"rc4export", SSL_EN_RC4_128_EXPORT40_WITH_MD5}, | |
{"rc2", SSL_EN_RC2_128_CBC_WITH_MD5}, | |
{"rc2export", SSL_EN_RC2_128_CBC_EXPORT40_WITH_MD5}, | |
{"des", SSL_EN_DES_64_CBC_WITH_MD5}, | |
{"desede3", SSL_EN_DES_192_EDE3_CBC_WITH_MD5}, | |
/* SSL3/TLS cipher suites */ | |
{"rsa_rc4_128_md5", SSL_RSA_WITH_RC4_128_MD5}, | |
{"rsa_rc4_128_sha", SSL_RSA_WITH_RC4_128_SHA}, | |
{"rsa_3des_sha", SSL_RSA_WITH_3DES_EDE_CBC_SHA}, | |
{"rsa_des_sha", SSL_RSA_WITH_DES_CBC_SHA}, | |
{"rsa_rc4_40_md5", SSL_RSA_EXPORT_WITH_RC4_40_MD5}, | |
{"rsa_rc2_40_md5", SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5}, | |
{"rsa_null_md5", SSL_RSA_WITH_NULL_MD5}, | |
{"rsa_null_sha", SSL_RSA_WITH_NULL_SHA}, | |
{"fips_3des_sha", SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA}, | |
{"fips_des_sha", SSL_RSA_FIPS_WITH_DES_CBC_SHA}, | |
{"fortezza", SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA}, | |
{"fortezza_rc4_128_sha", SSL_FORTEZZA_DMS_WITH_RC4_128_SHA}, | |
{"fortezza_null", SSL_FORTEZZA_DMS_WITH_NULL_SHA}, | |
/* TLS 1.0: Exportable 56-bit Cipher Suites. */ | |
{"rsa_des_56_sha", TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA}, | |
{"rsa_rc4_56_sha", TLS_RSA_EXPORT1024_WITH_RC4_56_SHA}, | |
/* AES ciphers. */ | |
{"dhe_dss_aes_128_cbc_sha", TLS_DHE_DSS_WITH_AES_128_CBC_SHA}, | |
{"dhe_dss_aes_256_cbc_sha", TLS_DHE_DSS_WITH_AES_256_CBC_SHA}, | |
{"dhe_rsa_aes_128_cbc_sha", TLS_DHE_RSA_WITH_AES_128_CBC_SHA}, | |
{"dhe_rsa_aes_256_cbc_sha", TLS_DHE_RSA_WITH_AES_256_CBC_SHA}, | |
{"rsa_aes_128_sha", TLS_RSA_WITH_AES_128_CBC_SHA}, | |
{"rsa_aes_256_sha", TLS_RSA_WITH_AES_256_CBC_SHA}, | |
/* ECC ciphers. */ | |
{"ecdh_ecdsa_null_sha", TLS_ECDH_ECDSA_WITH_NULL_SHA}, | |
{"ecdh_ecdsa_rc4_128_sha", TLS_ECDH_ECDSA_WITH_RC4_128_SHA}, | |
{"ecdh_ecdsa_3des_sha", TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA}, | |
{"ecdh_ecdsa_aes_128_sha", TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA}, | |
{"ecdh_ecdsa_aes_256_sha", TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA}, | |
{"ecdhe_ecdsa_null_sha", TLS_ECDHE_ECDSA_WITH_NULL_SHA}, | |
{"ecdhe_ecdsa_rc4_128_sha", TLS_ECDHE_ECDSA_WITH_RC4_128_SHA}, | |
{"ecdhe_ecdsa_3des_sha", TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA}, | |
{"ecdhe_ecdsa_aes_128_sha", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA}, | |
{"ecdhe_ecdsa_aes_256_sha", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA}, | |
{"ecdh_rsa_null_sha", TLS_ECDH_RSA_WITH_NULL_SHA}, | |
{"ecdh_rsa_128_sha", TLS_ECDH_RSA_WITH_RC4_128_SHA}, | |
{"ecdh_rsa_3des_sha", TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA}, | |
{"ecdh_rsa_aes_128_sha", TLS_ECDH_RSA_WITH_AES_128_CBC_SHA}, | |
{"ecdh_rsa_aes_256_sha", TLS_ECDH_RSA_WITH_AES_256_CBC_SHA}, | |
{"ecdhe_rsa_null", TLS_ECDHE_RSA_WITH_NULL_SHA}, | |
{"ecdhe_rsa_rc4_128_sha", TLS_ECDHE_RSA_WITH_RC4_128_SHA}, | |
{"ecdhe_rsa_3des_sha", TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA}, | |
{"ecdhe_rsa_aes_128_sha", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA}, | |
{"ecdhe_rsa_aes_256_sha", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA}, | |
{"ecdh_anon_null_sha", TLS_ECDH_anon_WITH_NULL_SHA}, | |
{"ecdh_anon_rc4_128sha", TLS_ECDH_anon_WITH_RC4_128_SHA}, | |
{"ecdh_anon_3des_sha", TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA}, | |
{"ecdh_anon_aes_128_sha", TLS_ECDH_anon_WITH_AES_128_CBC_SHA}, | |
{"ecdh_anon_aes_256_sha", TLS_ECDH_anon_WITH_AES_256_CBC_SHA}, | |
#ifdef TLS_RSA_WITH_NULL_SHA256 | |
/* new HMAC-SHA256 cipher suites specified in RFC */ | |
{"rsa_null_sha_256", TLS_RSA_WITH_NULL_SHA256}, | |
{"rsa_aes_128_cbc_sha_256", TLS_RSA_WITH_AES_128_CBC_SHA256}, | |
{"rsa_aes_256_cbc_sha_256", TLS_RSA_WITH_AES_256_CBC_SHA256}, | |
{"dhe_rsa_aes_128_cbc_sha_256", TLS_DHE_RSA_WITH_AES_128_CBC_SHA256}, | |
{"dhe_rsa_aes_256_cbc_sha_256", TLS_DHE_RSA_WITH_AES_256_CBC_SHA256}, | |
{"ecdhe_ecdsa_aes_128_cbc_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256}, | |
{"ecdhe_rsa_aes_128_cbc_sha_256", TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256}, | |
#endif | |
#ifdef TLS_RSA_WITH_AES_128_GCM_SHA256 | |
/* AES GCM cipher suites in RFC 5288 and RFC 5289 */ | |
{"rsa_aes_128_gcm_sha_256", TLS_RSA_WITH_AES_128_GCM_SHA256}, | |
{"dhe_rsa_aes_128_gcm_sha_256", TLS_DHE_RSA_WITH_AES_128_GCM_SHA256}, | |
{"dhe_dss_aes_128_gcm_sha_256", TLS_DHE_DSS_WITH_AES_128_GCM_SHA256}, | |
{"ecdhe_ecdsa_aes_128_gcm_sha_256", TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256}, | |
{"ecdh_ecdsa_aes_128_gcm_sha_256", TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256}, | |
{"ecdhe_rsa_aes_128_gcm_sha_256", TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, | |
{"ecdh_rsa_aes_128_gcm_sha_256", TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256}, | |
#endif | |
#ifdef TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 | |
/* cipher suites using SHA384 */ | |
{"rsa_aes_256_gcm_sha_384", TLS_RSA_WITH_AES_256_GCM_SHA384}, | |
{"dhe_rsa_aes_256_gcm_sha_384", TLS_DHE_RSA_WITH_AES_256_GCM_SHA384}, | |
{"dhe_dss_aes_256_gcm_sha_384", TLS_DHE_DSS_WITH_AES_256_GCM_SHA384}, | |
{"ecdhe_ecdsa_aes_256_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384}, | |
{"ecdhe_rsa_aes_256_sha_384", TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384}, | |
{"ecdhe_ecdsa_aes_256_gcm_sha_384", TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384}, | |
{"ecdhe_rsa_aes_256_gcm_sha_384", TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, | |
#endif | |
#ifdef TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 | |
/* chacha20-poly1305 cipher suites */ | |
{"ecdhe_rsa_chacha20_poly1305_sha_256", | |
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256}, | |
{"ecdhe_ecdsa_chacha20_poly1305_sha_256", | |
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256}, | |
{"dhe_rsa_chacha20_poly1305_sha_256", | |
TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256}, | |
#endif | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment