07b87a
This patch adds EC_KEY_new_by_curve_name(), EC_KEY_free*() and
07b87a
SSL_CTX_set_tmp_ecdh().
07b87a
07b87a
This is ported from Net-SSLeay-1.56 to version 1.55.
07b87a
07b87a
diff -up Net-SSLeay-1.55/SSLeay.xs.orig Net-SSLeay-1.55/SSLeay.xs
07b87a
--- Net-SSLeay-1.55/SSLeay.xs.orig	2016-03-10 10:42:52.267612772 +0100
07b87a
+++ Net-SSLeay-1.55/SSLeay.xs	2016-03-10 09:56:18.846933771 +0100
07b87a
@@ -4127,6 +4127,23 @@ SSL_CTX_set_tmp_rsa(ctx,rsa)
07b87a
      SSL_CTX *	ctx
07b87a
      RSA *	rsa
07b87a
 
07b87a
+#if OPENSSL_VERSION_NUMBER > 0x10000000L
07b87a
+
07b87a
+EC_KEY *
07b87a
+EC_KEY_new_by_curve_name(nid)
07b87a
+    int nid
07b87a
+
07b87a
+void
07b87a
+EC_KEY_free(key)
07b87a
+    EC_KEY * key
07b87a
+
07b87a
+long
07b87a
+SSL_CTX_set_tmp_ecdh(ctx,ecdh);
07b87a
+     SSL_CTX * ctx
07b87a
+     EC_KEY  * ecdh
07b87a
+
07b87a
+#endif
07b87a
+
07b87a
 void *
07b87a
 SSL_get_app_data(s)
07b87a
      SSL *	s
07b87a
diff -up Net-SSLeay-1.55/typemap.orig Net-SSLeay-1.55/typemap
07b87a
--- Net-SSLeay-1.55/typemap.orig	2016-03-10 10:40:49.886151370 +0100
07b87a
+++ Net-SSLeay-1.55/typemap	2016-03-10 10:41:37.640941202 +0100
07b87a
@@ -6,6 +6,7 @@ SSL_SESSION *	T_PTR
07b87a
 SSL *		T_PTR
07b87a
 RSA *		T_PTR
07b87a
 DH *		T_PTR
07b87a
+EC_KEY *	T_PTR
07b87a
 const X509 *        T_PTR
07b87a
 const X509_CRL *    T_PTR
07b87a
 const X509_REQ *    T_PTR
07b87a
diff -up Net-SSLeay-1.55/lib/Net/SSLeay.pod.orig Net-SSLeay-1.55/lib/Net/SSLeay.pod
07b87a
--- Net-SSLeay-1.55/lib/Net/SSLeay.pod.orig	2016-03-10 12:23:38.706870006 +0100
07b87a
+++ Net-SSLeay-1.55/lib/Net/SSLeay.pod	2016-03-10 12:28:04.280365357 +0100
07b87a
@@ -7500,6 +7500,25 @@ Enable or disable FIPS mode in a FIPS ca
07b87a
 
07b87a
 =back
07b87a
 
07b87a
+=head3 Low level API: EC related functions
07b87a
+ 
07b87a
+=over 
07b87a
+ 
07b87a
+=item * CTX_set_tmp_ecdh
07b87a
+ 
07b87a
+TBA
07b87a
+ 
07b87a
+=item * EC_KEY_free
07b87a
+ 
07b87a
+TBA
07b87a
+ 
07b87a
+=item * EC_KEY_new_by_curve_name
07b87a
+ 
07b87a
+TBA
07b87a
+ 
07b87a
+=back
07b87a
+
07b87a
+
07b87a
 =head2 Constants
07b87a
 
07b87a
 There are many openssl constants available in L<Net::SSLeay>. You can use them like this: