aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/backends/openssl
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2019-11-03 01:47:13 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-11-03 13:47:13 +0800
commit9668b000326585339267a42176facd9ff81481ee (patch)
treed9b57ace202f397461f9cb8aca436a24a68f699a /src/cryptography/hazmat/backends/openssl
parent6d450f7fdc6be790443d82aa5aff8572ba3965bf (diff)
downloadcryptography-9668b000326585339267a42176facd9ff81481ee.tar.gz
cryptography-9668b000326585339267a42176facd9ff81481ee.tar.bz2
cryptography-9668b000326585339267a42176facd9ff81481ee.zip
Deal with the 2.5 deprecations (#5048)
* Deal with the 2.5 deprecations * pep8 + test fixes * docs typo * Why did I do this? * typo
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl')
-rw-r--r--src/cryptography/hazmat/backends/openssl/x25519.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x25519.py b/src/cryptography/hazmat/backends/openssl/x25519.py
index 9aab25b8..8708834e 100644
--- a/src/cryptography/hazmat/backends/openssl/x25519.py
+++ b/src/cryptography/hazmat/backends/openssl/x25519.py
@@ -4,8 +4,6 @@
from __future__ import absolute_import, division, print_function
-import warnings
-
from cryptography import utils
from cryptography.hazmat.backends.openssl.utils import _evp_pkey_derive
from cryptography.hazmat.primitives import serialization
@@ -23,19 +21,7 @@ class _X25519PublicKey(object):
self._backend = backend
self._evp_pkey = evp_pkey
- def public_bytes(self, encoding=None, format=None):
- if encoding is None or format is None:
- if encoding is not None or format is not None:
- raise ValueError("Both encoding and format are required")
- else:
- warnings.warn(
- "public_bytes now requires encoding and format arguments. "
- "Support for calling without arguments will be removed in "
- "cryptography 2.7",
- utils.DeprecatedIn25,
- )
- encoding = serialization.Encoding.Raw
- format = serialization.PublicFormat.Raw
+ def public_bytes(self, encoding, format):
if (
encoding is serialization.Encoding.Raw or
format is serialization.PublicFormat.Raw