mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
docs for what bytes means for DNSName, URI, and RFC822Name (#3904)
This commit is contained in:
parent
d02842b03b
commit
1b86dc527d
2 changed files with 41 additions and 9 deletions
|
|
@ -79,5 +79,11 @@ Glossary
|
|||
but does not allow access to the key itself. Typically an opaque key is
|
||||
loaded from a `hardware security module`_ (HSM).
|
||||
|
||||
A-label
|
||||
The ASCII compatible encoded (ACE) representation of an
|
||||
internationalized (unicode) domain name. A-labels begin with the
|
||||
prefix ``xn--``. To create an A-label from a unicode domain string use
|
||||
a library like `idna`_.
|
||||
|
||||
.. _`hardware security module`: https://en.wikipedia.org/wiki/Hardware_security_module
|
||||
.. _`idna`: https://pypi.org/project/idna/
|
||||
|
|
|
|||
|
|
@ -1242,13 +1242,18 @@ General Name Classes
|
|||
|
||||
.. versionadded:: 0.9
|
||||
|
||||
This corresponds to an email address. For example, ``user@example.com``.
|
||||
|
||||
..note::
|
||||
|
||||
Starting with version 2.1 unicode input is deprecated. If passing an
|
||||
internationalized domain name (IDN) you should first IDNA encode the
|
||||
hostname and then pass the resulting bytes.
|
||||
email address containing an internationalized domain name (IDN) you
|
||||
should first IDNA encode the hostname and then pass the resulting
|
||||
bytes.
|
||||
|
||||
This corresponds to an email address. For example, ``user@example.com``.
|
||||
|
||||
:param bytes value: The email address. If the address contains an
|
||||
internationalized domain name then it must be encoded to an
|
||||
:term:`A-label` before being passed.
|
||||
|
||||
.. attribute:: bytes_value
|
||||
|
||||
|
|
@ -1256,6 +1261,9 @@ General Name Classes
|
|||
|
||||
:type: bytes
|
||||
|
||||
The value as a byte string. This will contain an :term:`A-label` if
|
||||
the domain in the address is an internationalized domain name.
|
||||
|
||||
.. attribute:: value
|
||||
|
||||
.. deprecated:: 2.1
|
||||
|
|
@ -1268,14 +1276,26 @@ General Name Classes
|
|||
|
||||
.. versionadded:: 0.9
|
||||
|
||||
..note::
|
||||
|
||||
Starting with version 2.1 unicode input is deprecated. If passing an
|
||||
internationalized domain name (IDN) you should first IDNA encode the
|
||||
hostname and then pass the resulting bytes.
|
||||
|
||||
This corresponds to a domain name. For example, ``cryptography.io``.
|
||||
|
||||
:param bytes value: The domain name. If it is an internationalized domain
|
||||
name then it must be encoded to an :term:`A-label` before being passed.
|
||||
|
||||
.. attribute:: bytes_value
|
||||
|
||||
.. versionadded:: 2.1
|
||||
|
||||
:type: bytes
|
||||
|
||||
The value as a byte string. This will contain an :term:`A-label` if
|
||||
it is an internationalized domain name.
|
||||
|
||||
.. attribute:: value
|
||||
|
||||
.. deprecated:: 2.1
|
||||
|
|
@ -1298,14 +1318,17 @@ General Name Classes
|
|||
|
||||
.. versionadded:: 0.9
|
||||
|
||||
This corresponds to a uniform resource identifier. For example,
|
||||
``https://cryptography.io``.
|
||||
|
||||
..note::
|
||||
|
||||
Starting with version 2.1 unicode input is deprecated. If passing an
|
||||
internationalized domain name (IDN) you should first IDNA encode the
|
||||
hostname and then pass the resulting bytes.
|
||||
internationalized domain name (IDN) within the URI you should first
|
||||
IDNA encode the hostname and then pass the resulting bytes.
|
||||
|
||||
This corresponds to a uniform resource identifier. For example,
|
||||
``https://cryptography.io``.
|
||||
|
||||
:param bytes value: The URI. If it contains an internationalized domain
|
||||
name then it must be encoded to an :term:`A-label` before being passed.
|
||||
|
||||
.. attribute:: bytes_value
|
||||
|
||||
|
|
@ -1313,6 +1336,9 @@ General Name Classes
|
|||
|
||||
:type: bytes
|
||||
|
||||
The value as a byte string. This will contain an :term:`A-label` if
|
||||
the URI contains an internationalized domain name.
|
||||
|
||||
.. attribute:: value
|
||||
|
||||
.. deprecated:: 2.1
|
||||
|
|
|
|||
Loading…
Reference in a new issue