diff options
-rw-r--r-- | CONTRIBUTING.rst | 4 | ||||
-rw-r--r-- | doc/api/crypto.rst | 66 | ||||
-rw-r--r-- | src/OpenSSL/crypto.py | 6 |
3 files changed, 37 insertions, 39 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e28f53b..558e142 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -107,7 +107,7 @@ Feel free to cross-check this information with Keybase_. .. _GitHub issue tracker: https://github.com/pyca/pyopenssl/issues -.. _GPG: http://en.wikipedia.org/wiki/GNU_Privacy_Guard +.. _GPG: https://en.wikipedia.org/wiki/GNU_Privacy_Guard .. _Keybase: https://keybase.io/hynek .. _pyca/pyopenssl: https://github.com/pyca/pyopenssl .. _PEP 8: https://www.python.org/dev/peps/pep-0008/ @@ -117,6 +117,6 @@ Feel free to cross-check this information with Keybase_. .. _mailing list: https://mail.python.org/mailman/listinfo/cryptography-dev .. _members of PyCA: https://github.com/orgs/pyca/people .. _semantic newlines: http://rhodesmill.org/brandon/2012/one-sentence-per-line/ -.. _reStructuredText: http://sphinx-doc.org/rest.htm +.. _reStructuredText: http://sphinx-doc.org/rest.html .. _CHANGELOG.rst: https://github.com/pyca/pyopenssl/blob/master/CHANGELOG.rst .. _`Code of Conduct`: https://github.com/pyca/pyopenssl/blob/master/CODE_OF_CONDUCT.rst diff --git a/doc/api/crypto.rst b/doc/api/crypto.rst index 27da7e8..ae8a64a 100644 --- a/doc/api/crypto.rst +++ b/doc/api/crypto.rst @@ -297,49 +297,45 @@ Exceptions Generic exception used in the :py:mod:`.crypto` module. + Digest names ------------ -Several of the functions and methods in this module take a digest -name. These must be strings describing a digest algorithm supported by -OpenSSL (by ``EVP_get_digestbyname``, specifically). For example, -:py:const:`b"md5"` or :py:const:`b"sha1"`. +Several of the functions and methods in this module take a digest name. +These must be strings describing a digest algorithm supported by OpenSSL (by ``EVP_get_digestbyname``, specifically). +For example, :const:`b"md5"` or :const:`b"sha1"`. + +More information and a list of these digest names can be found in the ``EVP_DigestInit(3)`` man page of your OpenSSL installation. +This page can be found online for the latest version of OpenSSL: +https://www.openssl.org/docs/manmaster/crypto/EVP_DigestInit.html -More information and a list of these digest names can be found in the -``EVP_DigestInit(3)`` man page of your OpenSSL installation. This page -can be found online for the latest version of OpenSSL: -https://www.openssl.org/docs/crypto/EVP_DigestInit.html Backwards compatible type names ------------------------------- -When PyOpenSSL was originally written, the most current version of -Python was 2.1. It made a distinction between classes and types. None -of the versions of Python currently supported by PyOpenSSL still -enforce that distinction: the type of an instance of an -:py:class:`X509` object is now simply :py:class:`X509`. Originally, -the type would have been :py:class:`X509Type`. These days, -:py:class:`X509Type` and :py:class:`X509` are literally the same -object. PyOpenSSL maintains these old names for backwards -compatibility. +When PyOpenSSL was originally written, the most current version of Python was 2.1. +It made a distinction between classes and types. +None of the versions of Python currently supported by pyOpenSSL still enforce that distinction: +the type of an instance of an :class:`X509` object is now simply :class:`X509`. +Originally, the type would have been :class:`X509Type`. +These days, :class:`X509Type` and :class:`X509` are literally the same object. +pyOpenSSL maintains these old names for backwards compatibility. Here's a table of these backwards-compatible names: -========================= ============================= -Type name Backwards-compatible name -========================= ============================= -:py:class:`X509` :py:class:`X509Type` -:py:class:`X509Name` :py:class:`X509NameType` -:py:class:`X509Req` :py:class:`X509ReqType` -:py:class:`X509Store` :py:class:`X509StoreType` -:py:class:`X509Extension` :py:class:`X509ExtensionType` -:py:class:`PKey` :py:class:`PKeyType` -:py:class:`PKCS7` :py:class:`PKCS7Type` -:py:class:`PKCS12` :py:class:`PKCS12Type` -:py:class:`NetscapeSPKI` :py:class:`NetscapeSPKIType` -:py:class:`CRL` :py:class:`CRLType` -========================= ============================= - -Some objects, such as :py:class`Revoked`, don't have ``Type`` -equivalents, because they were added after the restriction had been -lifted. +====================== ========================== +Type name Backwards-compatible name +====================== ========================== +:class:`X509` :class:`X509Type` +:class:`X509Name` :class:`X509NameType` +:class:`X509Req` :class:`X509ReqType` +:class:`X509Store` :class:`X509StoreType` +:class:`X509Extension` :class:`X509ExtensionType` +:class:`PKey` :class:`PKeyType` +:class:`PKCS7` :class:`PKCS7Type` +:class:`PKCS12` :class:`PKCS12Type` +:class:`NetscapeSPKI` :class:`NetscapeSPKIType` +:class:`CRL` :class:`CRLType` +====================== ========================== + +Some objects, such as :class:`Revoked`, don't have ``Type`` equivalents, because they were added after the restriction had been lifted. diff --git a/src/OpenSSL/crypto.py b/src/OpenSSL/crypto.py index 13b328f..2cb3cbd 100644 --- a/src/OpenSSL/crypto.py +++ b/src/OpenSSL/crypto.py @@ -635,8 +635,7 @@ class X509Extension(object): """ Initializes an X509 extension. - :param type_name: The name of the type of extension to create. See - http://openssl.org/docs/apps/x509v3_config.html#STANDARD_EXTENSIONS + :param type_name: The name of the type of extension_ to create. :type type_name: :py:data:`bytes` :param bool critical: A flag indicating whether this is a critical @@ -650,6 +649,9 @@ class X509Extension(object): :param issuer: Optional X509 certificate to use as issuer. :type issuer: :py:class:`X509` + + .. _extension: https://openssl.org/docs/manmaster/apps/ + x509v3_config.html#STANDARD-EXTENSIONS """ ctx = _ffi.new("X509V3_CTX*") |