Update references to RFCs.
Some code predated the RFCs themselves, but the RFCs now exist. Also remove now obsolete comments and some unused #defines. See upstream's cffeacd91e70712c99c431bf32a655fa1b561482. (Though this predates it; I just remembered I never uploaded it.) Change-Id: I5e56f0ab6b7f558820f72e84dfdbc71a8c23cb91 Reviewed-on: https://boringssl-review.googlesource.com/2475 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
41aa325c6a
commit
e518f65d2c
@ -125,7 +125,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Signalling cipher suite value: from draft-ietf-tls-renegotiation-03.txt */
|
||||
/* Signalling cipher suite value: from RFC5746 */
|
||||
#define SSL3_CK_SCSV 0x030000FF
|
||||
/* Fallback signalling cipher suite value: not IANA assigned.
|
||||
* See https://tools.ietf.org/html/draft-bmoeller-tls-downgrade-scsv-01 */
|
||||
|
@ -231,7 +231,7 @@ extern "C" {
|
||||
/* ExtensionType value from RFC5620 */
|
||||
#define TLSEXT_TYPE_heartbeat 15
|
||||
|
||||
/* ExtensionType value from draft-ietf-tls-applayerprotoneg-00 */
|
||||
/* ExtensionType value from RFC7301 */
|
||||
#define TLSEXT_TYPE_application_layer_protocol_negotiation 16
|
||||
|
||||
/* ExtensionType value for TLS padding extension.
|
||||
@ -264,12 +264,10 @@ extern "C" {
|
||||
/* status request value from RFC 3546 */
|
||||
#define TLSEXT_STATUSTYPE_ocsp 1
|
||||
|
||||
/* ECPointFormat values from draft-ietf-tls-ecc-12 */
|
||||
#define TLSEXT_ECPOINTFORMAT_first 0
|
||||
/* ECPointFormat values from RFC 4492 */
|
||||
#define TLSEXT_ECPOINTFORMAT_uncompressed 0
|
||||
#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
|
||||
#define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
|
||||
#define TLSEXT_ECPOINTFORMAT_last 2
|
||||
|
||||
/* Signature and hash algorithms from RFC 5246 */
|
||||
|
||||
@ -278,9 +276,6 @@ extern "C" {
|
||||
#define TLSEXT_signature_dsa 2
|
||||
#define TLSEXT_signature_ecdsa 3
|
||||
|
||||
/* Total number of different signature algorithms */
|
||||
#define TLSEXT_signature_num 4
|
||||
|
||||
#define TLSEXT_hash_none 0
|
||||
#define TLSEXT_hash_md5 1
|
||||
#define TLSEXT_hash_sha1 2
|
||||
@ -289,10 +284,6 @@ extern "C" {
|
||||
#define TLSEXT_hash_sha384 5
|
||||
#define TLSEXT_hash_sha512 6
|
||||
|
||||
/* Total number of different digest algorithms */
|
||||
|
||||
#define TLSEXT_hash_num 7
|
||||
|
||||
/* Flag set for unrecognised algorithms */
|
||||
#define TLSEXT_nid_unknown 0x1000000
|
||||
|
||||
@ -450,7 +441,7 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
|
||||
#define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6
|
||||
#define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7
|
||||
|
||||
/* ECC ciphersuites from draft-ietf-tls-ecc-12.txt with changes soon to be in draft 13 */
|
||||
/* ECC ciphersuites from RFC4492 */
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
|
||||
#define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
|
||||
@ -550,7 +541,7 @@ SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,(void (*)(void))cb)
|
||||
#define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
|
||||
#define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
|
||||
|
||||
/* ECC ciphersuites from draft-ietf-tls-ecc-01.txt (Mar 15, 2001) */
|
||||
/* ECC ciphersuites from RFC4492 */
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
|
||||
#define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
|
||||
|
@ -410,9 +410,7 @@
|
||||
#define PENDING_SESSION -10000
|
||||
#define CERTIFICATE_SELECTION_PENDING -10001
|
||||
|
||||
/* From ECC-TLS draft, used in encoding the curve type in
|
||||
* ECParameters
|
||||
*/
|
||||
/* From RFC4492, used in encoding the curve type in ECParameters */
|
||||
#define EXPLICIT_PRIME_CURVE_TYPE 1
|
||||
#define EXPLICIT_CHAR2_CURVE_TYPE 2
|
||||
#define NAMED_CURVE_TYPE 3
|
||||
|
@ -369,6 +369,7 @@ SSL_early_callback_ctx_extension_get(const struct ssl_early_callback_ctx *ctx,
|
||||
}
|
||||
|
||||
|
||||
/* ECC curves from RFC4492 */
|
||||
static const int nid_list[] =
|
||||
{
|
||||
NID_sect163k1, /* sect163k1 (1) */
|
||||
@ -415,7 +416,6 @@ static const uint16_t eccurves_default[] =
|
||||
|
||||
int tls1_ec_curve_id2nid(uint16_t curve_id)
|
||||
{
|
||||
/* ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005) */
|
||||
if (curve_id < 1 || curve_id > sizeof(nid_list)/sizeof(nid_list[0]))
|
||||
return OBJ_undef;
|
||||
return nid_list[curve_id-1];
|
||||
@ -1131,11 +1131,6 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *buf, unsigned c
|
||||
s2n(TLSEXT_TYPE_elliptic_curves,ret);
|
||||
s2n((curves_len * 2) + 2, ret);
|
||||
|
||||
/* NB: draft-ietf-tls-ecc-12.txt uses a one-byte prefix for
|
||||
* elliptic_curve_list, but the examples use two bytes.
|
||||
* http://www1.ietf.org/mail-archive/web/tls/current/msg00538.html
|
||||
* resolves this to two bytes.
|
||||
*/
|
||||
s2n(curves_len * 2, ret);
|
||||
for (i = 0; i < curves_len; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user