Merge pull request #475 from alex/ecdhe-nids

Expose the nids for the various eliptical curve things. I don't understa...
diff --git a/cryptography/hazmat/bindings/openssl/ec.py b/cryptography/hazmat/bindings/openssl/ec.py
index cbb0336..c9ca388 100644
--- a/cryptography/hazmat/bindings/openssl/ec.py
+++ b/cryptography/hazmat/bindings/openssl/ec.py
@@ -12,12 +12,22 @@
 # limitations under the License.
 
 INCLUDES = """
+#include <openssl/ec.h>
+#include <openssl/obj_mac.h>
 """
 
 TYPES = """
 static const int Cryptography_HAS_EC;
 
 typedef ... EC_KEY;
+
+static const int NID_X9_62_prime192v1;
+static const int NID_X9_62_prime192v2;
+static const int NID_X9_62_prime192v3;
+static const int NID_X9_62_prime239v1;
+static const int NID_X9_62_prime239v2;
+static const int NID_X9_62_prime239v3;
+static const int NID_X9_62_prime256v1;
 """
 
 FUNCTIONS = """
@@ -31,6 +41,14 @@
 #ifdef OPENSSL_NO_EC
 static const long Cryptography_HAS_EC = 0;
 EC_KEY* (*EC_KEY_new_by_curve_name)(int) = NULL;
+
+static const long NID_X9_62_prime192v1 = -1;
+static const long NID_X9_62_prime192v2 = -1;
+static const long NID_X9_62_prime192v3 = -1;
+static const long NID_X9_62_prime239v1 = -1;
+static const long NID_X9_62_prime239v2 = -1;
+static const long NID_X9_62_prime239v3 = -1;
+static const long NID_X9_62_prime256v1 = -1;
 #else
 static const long Cryptography_HAS_EC = 1;
 #endif
@@ -39,5 +57,13 @@
 CONDITIONAL_NAMES = {
     "Cryptography_HAS_EC": [
         "EC_KEY_new_by_curve_name",
-    ]
+
+        "NID_X9_62_prime192v1",
+        "NID_X9_62_prime192v2",
+        "NID_X9_62_prime192v3",
+        "NID_X9_62_prime239v1",
+        "NID_X9_62_prime239v2",
+        "NID_X9_62_prime239v3",
+        "NID_X9_62_prime256v1",
+    ],
 }