1) It works for me with pyOpenSSL HEAD. With a suitable ECDH enabled OpenSSL, this indeed provides ECDH (tested with https://www.ssllabs.com/ssltest/analyze.html and `openssl s_client`
2) There is a small typo in
```
:param curve_name: The curve name constant (e.g. SSL.NID_X9_64_prime256v1)
```
This should be `SSL.NID_X9_62_prime256v1`.
Probably it would also be helpful to list the available curves in the function docstring.
3) Besides having the constant for curve identification, it would also be nice to have the human readable curve names accesible (for UI reasons .. let the user choose the curve).
2 notes:
1) It works for me with pyOpenSSL HEAD. With a suitable ECDH enabled OpenSSL, this indeed provides ECDH (tested with https:/ /www.ssllabs. com/ssltest/ analyze. html and `openssl s_client`
2) There is a small typo in
``` X9_64_prime256v 1)
:param curve_name: The curve name constant (e.g. SSL.NID_
```
This should be `SSL.NID_ X9_62_prime256v 1`.
Probably it would also be helpful to list the available curves in the function docstring.
3) Besides having the constant for curve identification, it would also be nice to have the human readable curve names accesible (for UI reasons .. let the user choose the curve).
SSL.SN_ X9_62_prime192v 1 = "prime192v1" X9_62_prime192v 2 = "prime192v2" X9_62_prime192v 3 = "prime192v3" X9_62_prime239v 1 = "prime239v1" X9_62_prime239v 2 = "prime239v2" X9_62_prime239v 3 = "prime239v3" X9_62_prime256v 1 = "prime256v1"
SSL.SN_
SSL.SN_
SSL.SN_
SSL.SN_
SSL.SN_
SSL.SN_
so one can do things like
``` SN_X9_62_ prime192v1: SSL.NID_ X9_62_prime192v 1, SN_X9_62_ prime192v2: SSL.NID_ X9_62_prime192v 2, SN_X9_62_ prime192v3: SSL.NID_ X9_62_prime192v 3, SN_X9_62_ prime239v1: SSL.NID_ X9_62_prime239v 1, SN_X9_62_ prime239v2: SSL.NID_ X9_62_prime239v 2, SN_X9_62_ prime239v3: SSL.NID_ X9_62_prime239v 3, SN_X9_62_ prime256v1: SSL.NID_ X9_62_prime256v 1
ELLIPTIC_CURVES = {
SSL.
SSL.
SSL.
SSL.
SSL.
SSL.
SSL.
}
ECDH_DEFAULT_CURVE = ELLIPTIC_ CURVES[ "prime256v1" ]
```