diff options
-rw-r--r-- | cryptography/__about__.py | 2 | ||||
-rw-r--r-- | docs/glossary.rst | 3 | ||||
-rw-r--r-- | docs/hazmat/bindings/index.rst | 2 | ||||
-rw-r--r-- | docs/hazmat/primitives/hmac.rst | 9 | ||||
-rw-r--r-- | setup.py | 13 | ||||
-rw-r--r-- | tests/test_utils.py | 2 | ||||
-rw-r--r-- | tests/utils.py | 4 |
7 files changed, 25 insertions, 10 deletions
diff --git a/cryptography/__about__.py b/cryptography/__about__.py index 46212bff..54a9dbe6 100644 --- a/cryptography/__about__.py +++ b/cryptography/__about__.py @@ -26,7 +26,7 @@ __version__ = "0.1.dev1" __author__ = ("Alex Gaynor, Hynek Schlawack, Donald Stufft, " "Laurens Van Houtven, Jean-Paul Calderone, Christian Heimes, " - "and individual contributors.") + "Paul Kehrer, and individual contributors.") __email__ = "cryptography-dev@python.org" __license__ = "Apache License, Version 2.0" diff --git a/docs/glossary.rst b/docs/glossary.rst index 63e0a6ce..4421fca3 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -2,6 +2,7 @@ Glossary ======== .. glossary:: + :sorted: plaintext User-readable data you care about. @@ -35,7 +36,7 @@ Glossary symmetric or asymmetric. Authentication is necessary for effective encryption. - Ciphertext indistinguishability + ciphertext indistinguishability This is a property of encryption systems whereby two encrypted messages aren't distinguishable without knowing the encryption key. This is considered a basic, necessary property for a working encryption system. diff --git a/docs/hazmat/bindings/index.rst b/docs/hazmat/bindings/index.rst index 809eddfc..e2a17591 100644 --- a/docs/hazmat/bindings/index.rst +++ b/docs/hazmat/bindings/index.rst @@ -6,7 +6,7 @@ Bindings .. currentmodule:: cryptography.hazmat.bindings ``cryptography`` aims to provide low-level CFFI based bindings to multiple -native C libraries. These provide no automatic initialisation of the library +native C libraries. These provide no automatic initialization of the library and may not provide complete wrappers for its API. Using these functions directly is likely to require you to be careful in diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst index b8f94fd2..dc5c54f8 100644 --- a/docs/hazmat/primitives/hmac.rst +++ b/docs/hazmat/primitives/hmac.rst @@ -74,8 +74,11 @@ message. .. method:: verify(signature) - Finalize the current context and securely compare digest to ``signature``. + Finalize the current context and securely compare digest to + ``signature``. - :param bytes signature: The bytes of the HMAC signature recieved. + :param bytes signature: The bytes to compare the current digest + against. :raises cryptography.exceptions.AlreadyFinalized: See :meth:`finalize` - :raises cryptography.exceptions.InvalidSignature: If signature does not match digest + :raises cryptography.exceptions.InvalidSignature: If signature does not + match digest @@ -10,12 +10,16 @@ # implied. # See the License for the specific language governing permissions and # limitations under the License. +import os + from setuptools import setup, find_packages +base_dir = os.path.dirname(__file__) + about = {} -with open("cryptography/__about__.py") as fp: - exec(fp.read(), about) +with open(os.path.join(base_dir, "cryptography", "__about__.py")) as f: + exec(f.read(), about) CFFI_DEPENDENCY = "cffi>=0.6" @@ -30,11 +34,16 @@ setup_requires = [ CFFI_DEPENDENCY, ] +with open(os.path.join(base_dir, "README.rst")) as f: + long_description = f.read() + + setup( name=about["__title__"], version=about["__version__"], description=about["__summary__"], + long_description=long_description, license=about["__license__"], url=about["__uri__"], diff --git a/tests/test_utils.py b/tests/test_utils.py index c640367e..e3e53d63 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -50,7 +50,7 @@ def test_check_backend_support_skip(): funcargs={"backend": True}) with pytest.raises(pytest.skip.Exception) as exc_info: check_backend_support(item) - assert exc_info.value.args[0] == "Nope" + assert exc_info.value.args[0] == "Nope (True)" def test_check_backend_support_no_skip(): diff --git a/tests/utils.py b/tests/utils.py index beb2ca5d..693a0c8f 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -28,7 +28,9 @@ def check_backend_support(item): supported = item.keywords.get("supported") if supported and "backend" in item.funcargs: if not supported.kwargs["only_if"](item.funcargs["backend"]): - pytest.skip(supported.kwargs["skip_message"]) + pytest.skip("{0} ({1})".format( + supported.kwargs["skip_message"], item.funcargs["backend"] + )) elif supported: raise ValueError("This mark is only available on methods that take a " "backend") |