diff options
-rw-r--r-- | CHANGELOG.rst | 39 | ||||
-rw-r--r-- | cryptography/hazmat/bindings/openssl/x509v3.py | 1 | ||||
-rw-r--r-- | docs/hazmat/primitives/mac/cmac.rst | 4 | ||||
-rw-r--r-- | docs/hazmat/primitives/mac/hmac.rst | 4 | ||||
-rw-r--r-- | docs/random-numbers.rst | 3 | ||||
-rw-r--r-- | tox.ini | 2 |
6 files changed, 33 insertions, 20 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a5025e12..3969cb9e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -55,20 +55,25 @@ Changelog * Added :class:`~cryptography.hazmat.primitives.ciphers.modes.ECB` support for :class:`~cryptography.hazmat.primitives.ciphers.algorithms.TripleDES` on :doc:`/hazmat/backends/commoncrypto` and :doc:`/hazmat/backends/openssl`. -* Deprecated :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey` - in favor of backend specific providers of the +* Deprecated + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey` in + favor of backend specific providers of the :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` interface. -* Deprecated :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey` - in favor of backend specific providers of the +* Deprecated + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey` in favor + of backend specific providers of the :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` interface. -* Deprecated :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` - in favor of backend specific providers of the +* Deprecated + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPrivateKey` in + favor of backend specific providers of the :class:`~cryptography.hazmat.primitives.interfaces.DSAPrivateKey` interface. -* Deprecated :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` - in favor of backend specific providers of the +* Deprecated + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAPublicKey` in favor + of backend specific providers of the :class:`~cryptography.hazmat.primitives.interfaces.DSAPublicKey` interface. -* Deprecated :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` - in favor of backend specific providers of the +* Deprecated + :class:`~cryptography.hazmat.primitives.asymmetric.dsa.DSAParameters` in + favor of backend specific providers of the :class:`~cryptography.hazmat.primitives.interfaces.DSAParameters` interface. * Deprecated ``encrypt_rsa``, ``decrypt_rsa``, ``create_rsa_signature_ctx`` and ``create_rsa_verification_ctx`` on @@ -81,9 +86,11 @@ Changelog * Deprecated ``salt_length`` on :class:`~cryptography.hazmat.primitives.asymmetric.padding.MGF1` and added it - to :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS`. It will be - removed from ``MGF1`` in two releases per our :doc:`/api-stability` policy. -* Added :class:`~cryptography.hazmat.primitives.ciphers.algorithms.SEED` support. + to :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS`. It will + be removed from ``MGF1`` in two releases per our :doc:`/api-stability` + policy. +* Added :class:`~cryptography.hazmat.primitives.ciphers.algorithms.SEED` + support. * Added :class:`~cryptography.hazmat.primitives.cmac.CMAC`. * Added decryption support to :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey` @@ -99,7 +106,8 @@ Changelog * Added :class:`~cryptography.hazmat.primitives.twofactor.hotp.HOTP`. * Added :class:`~cryptography.hazmat.primitives.twofactor.totp.TOTP`. -* Added :class:`~cryptography.hazmat.primitives.ciphers.algorithms.IDEA` support. +* Added :class:`~cryptography.hazmat.primitives.ciphers.algorithms.IDEA` + support. * Added signature support to :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey` and verification support to @@ -109,7 +117,8 @@ Changelog 0.2.2 - 2014-03-03 ~~~~~~~~~~~~~~~~~~ -* Removed a constant definition that was causing compilation problems with specific versions of OpenSSL. +* Removed a constant definition that was causing compilation problems with + specific versions of OpenSSL. 0.2.1 - 2014-02-22 ~~~~~~~~~~~~~~~~~~ diff --git a/cryptography/hazmat/bindings/openssl/x509v3.py b/cryptography/hazmat/bindings/openssl/x509v3.py index b668951a..cf4be1fe 100644 --- a/cryptography/hazmat/bindings/openssl/x509v3.py +++ b/cryptography/hazmat/bindings/openssl/x509v3.py @@ -83,6 +83,7 @@ void X509V3_set_ctx(X509V3_CTX *, X509 *, X509 *, X509_REQ *, X509_CRL *, int); X509_EXTENSION *X509V3_EXT_nconf(CONF *, X509V3_CTX *, char *, char *); int GENERAL_NAME_print(BIO *, GENERAL_NAME *); void GENERAL_NAMES_free(GENERAL_NAMES *); +void *X509V3_EXT_d2i(X509_EXTENSION *); """ MACROS = """ diff --git a/docs/hazmat/primitives/mac/cmac.rst b/docs/hazmat/primitives/mac/cmac.rst index 104ba8b8..1ba1b3fa 100644 --- a/docs/hazmat/primitives/mac/cmac.rst +++ b/docs/hazmat/primitives/mac/cmac.rst @@ -31,7 +31,7 @@ A subset of CMAC with the AES-128 algorithm is described in :rfc:`4493`. >>> from cryptography.hazmat.primitives.ciphers import algorithms >>> c = cmac.CMAC(algorithms.AES(key), backend=default_backend()) >>> c.update(b"message to authenticate") - >>> c.copy().finalize() + >>> c.finalize() 'CT\x1d\xc8\x0e\x15\xbe4e\xdb\xb6\x84\xca\xd9Xk' If the backend doesn't support the requested ``algorithm`` an @@ -47,6 +47,8 @@ A subset of CMAC with the AES-128 algorithm is described in :rfc:`4493`. .. doctest:: + >>> c = cmac.CMAC(algorithms.AES(key), backend=default_backend()) + >>> c.update(b"message to authenticate") >>> c.verify(b"an incorrect signature") Traceback (most recent call last): ... diff --git a/docs/hazmat/primitives/mac/hmac.rst b/docs/hazmat/primitives/mac/hmac.rst index da75fa9d..9ce49c8d 100644 --- a/docs/hazmat/primitives/mac/hmac.rst +++ b/docs/hazmat/primitives/mac/hmac.rst @@ -31,7 +31,7 @@ of a message. >>> from cryptography.hazmat.primitives import hashes, hmac >>> h = hmac.HMAC(key, hashes.SHA256(), backend=default_backend()) >>> h.update(b"message to hash") - >>> h.copy().finalize() + >>> h.finalize() '#F\xdaI\x8b"e\xc4\xf1\xbb\x9a\x8fc\xff\xf5\xdex.\xbc\xcd/+\x8a\x86\x1d\x84\'\xc3\xa6\x1d\xd8J' If the backend doesn't support the requested ``algorithm`` an @@ -47,6 +47,8 @@ of a message. .. doctest:: + >>> h = hmac.HMAC(key, hashes.SHA256(), backend=default_backend()) + >>> h.update(b"message to hash") >>> h.verify(b"an incorrect signature") Traceback (most recent call last): ... diff --git a/docs/random-numbers.rst b/docs/random-numbers.rst index 410f3757..68a72cf7 100644 --- a/docs/random-numbers.rst +++ b/docs/random-numbers.rst @@ -16,7 +16,6 @@ can obtain them with: .. doctest:: >>> import os - >>> os.urandom(16) - '...' + >>> iv = os.urandom(16) .. _`always use your operating system's provided random number generator`: http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ @@ -27,7 +27,7 @@ commands = sphinx-build -W -b latex -d {envtmpdir}/doctrees docs docs/_build/latex sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html sphinx-build -W -b spelling docs docs/_build/html - doc8 --allow-long-titles README.rst docs/ + doc8 --allow-long-titles README.rst CHANGELOG.rst docs/ [testenv:docs-linkcheck] deps = |