From c918fef88670fc46433d3edd91957231c654ff05 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 7 Sep 2019 21:40:00 +0800 Subject: be clear that NoEncryption must be an instance in the exception (#4985) --- src/cryptography/hazmat/backends/openssl/ed25519.py | 2 +- src/cryptography/hazmat/backends/openssl/ed448.py | 2 +- src/cryptography/hazmat/backends/openssl/x25519.py | 2 +- src/cryptography/hazmat/backends/openssl/x448.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cryptography/hazmat/backends/openssl/ed25519.py b/src/cryptography/hazmat/backends/openssl/ed25519.py index f02f5622..f38f11d1 100644 --- a/src/cryptography/hazmat/backends/openssl/ed25519.py +++ b/src/cryptography/hazmat/backends/openssl/ed25519.py @@ -123,7 +123,7 @@ class _Ed25519PrivateKey(object): ): raise ValueError( "When using Raw both encoding and format must be Raw " - "and encryption_algorithm must be NoEncryption" + "and encryption_algorithm must be NoEncryption()" ) return self._raw_private_bytes() diff --git a/src/cryptography/hazmat/backends/openssl/ed448.py b/src/cryptography/hazmat/backends/openssl/ed448.py index cf2acf83..f541f05d 100644 --- a/src/cryptography/hazmat/backends/openssl/ed448.py +++ b/src/cryptography/hazmat/backends/openssl/ed448.py @@ -126,7 +126,7 @@ class _Ed448PrivateKey(object): ): raise ValueError( "When using Raw both encoding and format must be Raw " - "and encryption_algorithm must be NoEncryption" + "and encryption_algorithm must be NoEncryption()" ) return self._raw_private_bytes() diff --git a/src/cryptography/hazmat/backends/openssl/x25519.py b/src/cryptography/hazmat/backends/openssl/x25519.py index 914f5941..9aab25b8 100644 --- a/src/cryptography/hazmat/backends/openssl/x25519.py +++ b/src/cryptography/hazmat/backends/openssl/x25519.py @@ -115,7 +115,7 @@ class _X25519PrivateKey(object): ): raise ValueError( "When using Raw both encoding and format must be Raw " - "and encryption_algorithm must be NoEncryption" + "and encryption_algorithm must be NoEncryption()" ) return self._raw_private_bytes() diff --git a/src/cryptography/hazmat/backends/openssl/x448.py b/src/cryptography/hazmat/backends/openssl/x448.py index 13e4ce15..fe0dcd9c 100644 --- a/src/cryptography/hazmat/backends/openssl/x448.py +++ b/src/cryptography/hazmat/backends/openssl/x448.py @@ -95,7 +95,7 @@ class _X448PrivateKey(object): ): raise ValueError( "When using Raw both encoding and format must be Raw " - "and encryption_algorithm must be NoEncryption" + "and encryption_algorithm must be NoEncryption()" ) return self._raw_private_bytes() -- cgit v1.2.3