aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.travis/run.sh7
-rw-r--r--cryptography/hazmat/backends/interfaces.py4
-rw-r--r--docs/hazmat/backends/interfaces.rst7
3 files changed, 12 insertions, 6 deletions
diff --git a/.travis/run.sh b/.travis/run.sh
index 6739c886..6686a20f 100755
--- a/.travis/run.sh
+++ b/.travis/run.sh
@@ -6,8 +6,9 @@ set -x
if [[ "$(uname -s)" == "Darwin" ]]; then
eval "$(pyenv init -)"
if [[ "${OPENSSL}" != "0.9.8" ]]; then
- # so set our flags to use homebrew openssl
- export ARCHFLAGS="-arch x86_64"
+ # set our flags to use homebrew openssl and not error on
+ # unused compiler args (looking at you mno-fused-madd)
+ export ARCHFLAGS="-arch x86_64 -Wno-error=unused-command-line-argument-hard-error-in-future"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CFLAGS="-I/usr/local/opt/openssl/include"
# The Travis OS X jobs are run for two versions
@@ -15,6 +16,8 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
# CommonCrypto backend tests once. Exclude
# CommonCrypto when we test against brew OpenSSL
export TOX_FLAGS="--backend=openssl"
+ else
+ export ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future"
fi
fi
source ~/.venv/bin/activate
diff --git a/cryptography/hazmat/backends/interfaces.py b/cryptography/hazmat/backends/interfaces.py
index 4137b534..92413d8c 100644
--- a/cryptography/hazmat/backends/interfaces.py
+++ b/cryptography/hazmat/backends/interfaces.py
@@ -147,9 +147,9 @@ class OpenSSLSerializationBackend(object):
@six.add_metaclass(abc.ABCMeta)
class CMACBackend(object):
@abc.abstractmethod
- def cmac_supported(self):
+ def cmac_algorithm_supported(self, algorithm):
"""
- Returns True if the backend supports CMAC
+ Returns True if the block cipher is supported for CMAC by this backend
"""
@abc.abstractmethod
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 546aa766..394d060b 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -327,9 +327,12 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend with methods for using CMAC
- .. method:: cmac_supported()
+ .. method:: cmac_algorithm_supported(algorithm)
- :return: True if CMAC is supported by the backend. False if otherwise.
+ :param algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.BlockCipherAlgorithm`
+ provider.
+ :return: Returns True if the block cipher is supported for CMAC by this backend
.. method:: create_cmac_ctx(algorithm)