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>
diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h
index bf11bec..4adc2c8 100644
--- a/ssl/ssl_locl.h
+++ b/ssl/ssl_locl.h
@@ -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
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 4f93bda..034442a 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -369,6 +369,7 @@
}
+/* ECC curves from RFC4492 */
static const int nid_list[] =
{
NID_sect163k1, /* sect163k1 (1) */
@@ -415,7 +416,6 @@
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 @@
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++)
{