I think that the idiom thus far in pyOpenSSL is to wrap the kind of stateful object that a ... `EC_KEY*` (what `SSL_CTX_set_tmp_ecdh` takes) is in a thin object and unwrap it as necessary when going down to OpenSSL.

What do you think about an ... `EllipticalCurveKey` class that wraps this `EC_KEY*` and changing this method so that it is merely a wrapper around `SSL_CTX_set_tmp_ecdh`?  `EllipcitalCurveKey.new_by_curve_name(nid)` might be the way the other half of this functionality is accessed.

Just thinking out loud here, let me know if this sounds dumb.