diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-10-19 19:42:56 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-10-19 19:42:56 -0700 |
commit | f63ace86e4665c3413d905ec546ce6ef5b4e6bbb (patch) | |
tree | 91d5405a6c614c3773f0857eeadb62e0f4268518 | |
parent | 0123d4ca3c4a6b2da4a577b9943ec5bf4544246c (diff) | |
parent | 514f7d9446c46cb5d39f760bd64f4f986e6324dc (diff) | |
download | cryptography-f63ace86e4665c3413d905ec546ce6ef5b4e6bbb.tar.gz cryptography-f63ace86e4665c3413d905ec546ce6ef5b4e6bbb.tar.bz2 cryptography-f63ace86e4665c3413d905ec546ce6ef5b4e6bbb.zip |
Merge pull request #1417 from reaperhulk/fix-interface
add missing signer/verifier to DSAPublicKey and DSAPrivateKey ifaces
-rw-r--r-- | cryptography/hazmat/primitives/interfaces.py | 12 |
1 files changed, 12 insertions, 0 deletions
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): |