diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-22 20:22:34 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-10-22 20:22:34 -0500 |
commit | 360e2d53190fa612eccd3ae43c7cd3c240282a7a (patch) | |
tree | 60f69803f3921406b173afe3d307eafcdb50c896 /cryptography | |
parent | 2c4873f6255c70257a5a35efbad84e24fc2be63f (diff) | |
parent | 68e5de708d623a03ea4cbd4d3a4297b5722950eb (diff) | |
download | cryptography-360e2d53190fa612eccd3ae43c7cd3c240282a7a.tar.gz cryptography-360e2d53190fa612eccd3ae43c7cd3c240282a7a.tar.bz2 cryptography-360e2d53190fa612eccd3ae43c7cd3c240282a7a.zip |
Merge branch 'master' into api-to-backend-in-one-easy-step
* master:
Make use of currentmodule to maybe reduce redundant module definitions and also get source links.
Enable the new read the docs theme, it's pretty.
use is for identical object comparison
add gcm constants and EVP_CIPHER_CTX_ctrl macro
md5 is 128-bit. The person responsible for this mistake has been shot
add test to verify api is being copied in hash
When copying a hash, pass the api through to the new object
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/bindings/openssl/evp.py | 4 | ||||
-rw-r--r-- | cryptography/primitives/hashes.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/cryptography/bindings/openssl/evp.py b/cryptography/bindings/openssl/evp.py index 41df1056..80980c6e 100644 --- a/cryptography/bindings/openssl/evp.py +++ b/cryptography/bindings/openssl/evp.py @@ -29,6 +29,9 @@ typedef struct evp_pkey_st { } EVP_PKEY; static const int EVP_PKEY_RSA; static const int EVP_PKEY_DSA; +static const int EVP_CTRL_GCM_SET_IVLEN; +static const int EVP_CTRL_GCM_GET_TAG; +static const int EVP_CTRL_GCM_SET_TAG; """ FUNCTIONS = """ @@ -84,4 +87,5 @@ MACROS = """ int EVP_PKEY_assign_RSA(EVP_PKEY *, RSA *); int EVP_PKEY_assign_DSA(EVP_PKEY *, DSA *); int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *); +int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *, int, int, void *); """ diff --git a/cryptography/primitives/hashes.py b/cryptography/primitives/hashes.py index f3eccc6e..474dc167 100644 --- a/cryptography/primitives/hashes.py +++ b/cryptography/primitives/hashes.py @@ -40,7 +40,7 @@ class BaseHash(six.with_metaclass(abc.ABCMeta)): self._backend.update_hash_context(self._ctx, data) def copy(self): - return self.__class__(ctx=self._copy_ctx()) + return self.__class__(api=self._api, ctx=self._copy_ctx()) def digest(self): return self._backend.finalize_hash_context(self._copy_ctx(), |