aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2019-02-21 12:53:45 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2019-02-20 23:53:45 -0500
commite1f7e0978231f73382f95b864200fdeca7d37bb7 (patch)
treeea0c6c6362b62bf634922b94113e37a43f2fdfd9 /docs
parent5cfaa5b79d446e1c63de3948e7558cd00561ea1f (diff)
downloadcryptography-e1f7e0978231f73382f95b864200fdeca7d37bb7.tar.gz
cryptography-e1f7e0978231f73382f95b864200fdeca7d37bb7.tar.bz2
cryptography-e1f7e0978231f73382f95b864200fdeca7d37bb7.zip
add an EC OID to curve dictionary mapping (#4759)
* add an EC OID to curve dictionary mapping * oid_to_curve function * changelog and docs fix * rename to get_curve_for_oid
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/asymmetric/ec.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/ec.rst b/docs/hazmat/primitives/asymmetric/ec.rst
index d89fde3d..0035e5b0 100644
--- a/docs/hazmat/primitives/asymmetric/ec.rst
+++ b/docs/hazmat/primitives/asymmetric/ec.rst
@@ -926,6 +926,21 @@ Elliptic Curve Object Identifiers
Corresponds to the dotted string ``"1.3.132.0.39"``.
+.. function:: get_curve_for_oid(oid)
+
+ .. versionadded:: 2.6
+
+ A function that takes an :class:`~cryptography.x509.ObjectIdentifier`
+ and returns the associated elliptic curve class.
+
+ :param oid: An instance of
+ :class:`~cryptography.x509.ObjectIdentifier`.
+
+ :returns: The matching elliptic curve class. The returned class conforms
+ to the :class:`EllipticCurve` interface.
+
+ :raises LookupError: Raised if no elliptic curve is found that matches
+ the provided object identifier.
.. _`FIPS 186-3`: https://csrc.nist.gov/csrc/media/publications/fips/186/3/archive/2009-06-25/documents/fips_186-3.pdf
.. _`FIPS 186-4`: https://csrc.nist.gov/publications/detail/fips/186/4/final