Allocate a NID for X25519.

No corresponding OID, but SSL_CTX_set1_curves assumes NIDs exist.

BUG=571231

Change-Id: Id5221cdc59132e26a89ae5f8978b946de690b4e0
Reviewed-on: https://boringssl-review.googlesource.com/6779
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/obj/obj_dat.h b/crypto/obj/obj_dat.h
index 517dc49..bf44c6d 100644
--- a/crypto/obj/obj_dat.h
+++ b/crypto/obj/obj_dat.h
@@ -58,9 +58,9 @@
  * copied and put under another distribution licence
  * [including the GNU Public Licence.] */
 
-#define NUM_NID 948
-#define NUM_SN 940
-#define NUM_LN 940
+#define NUM_NID 949
+#define NUM_SN 941
+#define NUM_LN 941
 #define NUM_OBJ 882
 
 static const unsigned char lvalues[6176]={
@@ -2482,6 +2482,7 @@
 	NID_dhSinglePass_cofactorDH_sha512kdf_scheme,6,&(lvalues[6169]),0},
 {"dh-std-kdf","dh-std-kdf",NID_dh_std_kdf,0,NULL,0},
 {"dh-cofactor-kdf","dh-cofactor-kdf",NID_dh_cofactor_kdf,0,NULL,0},
+{"X25519","x25519",NID_x25519,0,NULL,0},
 };
 
 static const unsigned int kNIDsInShortNameOrder[NUM_SN]={
@@ -2668,6 +2669,7 @@
 143,	/* "SXNetID" */
 458,	/* "UID" */
  0,	/* "UNDEF" */
+948,	/* "X25519" */
 11,	/* "X500" */
 378,	/* "X500algorithms" */
 12,	/* "X509" */
@@ -4364,6 +4366,7 @@
 742,	/* "wap-wsg-idm-ecid-wtls9" */
 804,	/* "whirlpool" */
 868,	/* "x121Address" */
+948,	/* "x25519" */
 503,	/* "x500UniqueIdentifier" */
 158,	/* "x509Certificate" */
 160,	/* "x509Crl" */
diff --git a/crypto/obj/obj_mac.num b/crypto/obj/obj_mac.num
index e143ece..a0e09b8 100644
--- a/crypto/obj/obj_mac.num
+++ b/crypto/obj/obj_mac.num
@@ -945,3 +945,4 @@
 dhSinglePass_cofactorDH_sha512kdf_scheme		945
 dh_std_kdf		946
 dh_cofactor_kdf		947
+x25519		948
diff --git a/crypto/obj/objects.txt b/crypto/obj/objects.txt
index 2757c4f..93cf53a 100644
--- a/crypto/obj/objects.txt
+++ b/crypto/obj/objects.txt
@@ -1330,3 +1330,6 @@
 # NIDs for use with lookup tables.
                  : dh-std-kdf
                  : dh-cofactor-kdf
+
+# NID for X25519 (no corresponding OID).
+ : X25519 : x25519
diff --git a/include/openssl/obj_mac.h b/include/openssl/obj_mac.h
index 55e1cba..b636adc 100644
--- a/include/openssl/obj_mac.h
+++ b/include/openssl/obj_mac.h
@@ -4138,3 +4138,7 @@
 #define SN_dh_cofactor_kdf		"dh-cofactor-kdf"
 #define NID_dh_cofactor_kdf		947
 
+#define SN_x25519		"X25519"
+#define LN_x25519		"x25519"
+#define NID_x25519		948
+