From 514f7d9446c46cb5d39f760bd64f4f986e6324dc Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sun, 19 Oct 2014 18:00:41 -0700 Subject: add missing signer/verifier to DSAPublicKey and DSAPrivateKey ifaces These were present in the docs and the OpenSSL provider, but not properly listed on the interface --- cryptography/hazmat/primitives/interfaces.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py index c7ad0cf8..6ae0a4c5 100644 --- a/cryptography/hazmat/primitives/interfaces.py +++ b/cryptography/hazmat/primitives/interfaces.py @@ -287,6 +287,12 @@ class DSAPrivateKey(object): The DSAParameters object associated with this private key. """ + @abc.abstractmethod + def signer(self, signature_algorithm): + """ + Returns an AsymmetricSignatureContext used for signing data. + """ + @six.add_metaclass(abc.ABCMeta) class DSAPrivateKeyWithNumbers(DSAPrivateKey): @@ -311,6 +317,12 @@ class DSAPublicKey(object): The DSAParameters object associated with this public key. """ + @abc.abstractmethod + def verifier(self, signature, signature_algorithm): + """ + Returns an AsymmetricVerificationContext used for signing data. + """ + @six.add_metaclass(abc.ABCMeta) class DSAPublicKeyWithNumbers(DSAPublicKey): -- cgit v1.2.3