summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2014-04-19 09:28:28 -0400
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2014-04-19 09:28:28 -0400
commit3e4e33562d6f06ebe1205bd03425a9cc772a92d9 (patch)
tree26e0eff50bebbb6e8e4fd091a88619bbf4f45b16
parentd5839e2a950d475b518023b23dee06862aa5ba77 (diff)
downloadpyopenssl-3e4e33562d6f06ebe1205bd03425a9cc772a92d9.tar.gz
Mirror the OpenSSL API as is our idiom.
-rw-r--r--OpenSSL/SSL.py2
-rw-r--r--OpenSSL/test/test_ssl.py6
-rw-r--r--doc/api/ssl.rst2
3 files changed, 5 insertions, 5 deletions
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index a4b66ed..ec49c27 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -597,7 +597,7 @@ class Context(object):
_lib.SSL_CTX_set_tmp_dh(self._context, dh)
- def set_tmp_ecdh_curve(self, curve):
+ def set_tmp_ecdh(self, curve):
"""
Select a curve to use for ECDHE key exchange.
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 6231143..4c3b12a 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -1174,16 +1174,16 @@ class ContextTests(TestCase, _LoopbackMixin):
# XXX What should I assert here? -exarkun
- def test_set_tmp_ecdh_curve(self):
+ def test_set_tmp_ecdh(self):
"""
- :py:obj:`Context.set_tmp_ecdh_curve` sets the elliptic curve for
+ :py:obj:`Context.set_tmp_ecdh` sets the elliptic curve for
Diffie-Hellman to the specified curve.
"""
context = Context(TLSv1_METHOD)
for curve in get_elliptic_curves():
# The only easily "assertable" thing is that it does not raise an
# exception.
- context.set_tmp_ecdh_curve(curve)
+ context.set_tmp_ecdh(curve)
def test_set_cipher_list_bytes(self):
diff --git a/doc/api/ssl.rst b/doc/api/ssl.rst
index 9016e98..a75af1f 100644
--- a/doc/api/ssl.rst
+++ b/doc/api/ssl.rst
@@ -317,7 +317,7 @@ Context objects have the following methods:
Load parameters for Ephemeral Diffie-Hellman from *dhfile*.
-.. py:method:: Context.set_tmp_ecdh_curve(curve)
+.. py:method:: Context.set_tmp_ecdh(curve)
Select a curve to use for ECDHE key exchange.