diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-16 13:17:14 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-02-16 14:34:11 -0600 |
commit | 0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e (patch) | |
tree | 74f152da91f230f3b8c006e0ebca3eb5f86cf770 /src/cryptography/hazmat/backends/openssl/rsa.py | |
parent | 426eee7e732f90f04740e055381f0b37dadc2df1 (diff) | |
download | cryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.tar.gz cryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.tar.bz2 cryptography-0d6203f25ad15d5e369e23c8a30ba9d2e42eaf1e.zip |
move asymmetric signature/verification interfaces
Diffstat (limited to 'src/cryptography/hazmat/backends/openssl/rsa.py')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/rsa.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py index a4bb283d..00ddcda3 100644 --- a/src/cryptography/hazmat/backends/openssl/rsa.py +++ b/src/cryptography/hazmat/backends/openssl/rsa.py @@ -10,8 +10,10 @@ from cryptography import utils from cryptography.exceptions import ( AlreadyFinalized, InvalidSignature, UnsupportedAlgorithm, _Reasons ) -from cryptography.hazmat.primitives import hashes, interfaces -from cryptography.hazmat.primitives.asymmetric import rsa +from cryptography.hazmat.primitives import hashes +from cryptography.hazmat.primitives.asymmetric import ( + AsymmetricSignatureContext, AsymmetricVerificationContext, rsa +) from cryptography.hazmat.primitives.asymmetric.padding import ( AsymmetricPadding, MGF1, OAEP, PKCS1v15, PSS ) @@ -144,7 +146,7 @@ def _handle_rsa_enc_dec_error(backend, key): raise ValueError("Decryption failed.") -@utils.register_interface(interfaces.AsymmetricSignatureContext) +@utils.register_interface(AsymmetricSignatureContext) class _RSASignatureContext(object): def __init__(self, backend, private_key, padding, algorithm): self._backend = backend @@ -331,7 +333,7 @@ class _RSASignatureContext(object): return self._backend._ffi.buffer(sig_buf)[:sig_len] -@utils.register_interface(interfaces.AsymmetricVerificationContext) +@utils.register_interface(AsymmetricVerificationContext) class _RSAVerificationContext(object): def __init__(self, backend, public_key, signature, padding, algorithm): self._backend = backend |