diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-08-09 10:26:18 -0700 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-08-09 10:26:18 -0700 |
| commit | b1895f6f786b8be3bbaedf0b17ef1337b71bcfa1 (patch) | |
| tree | c9f546932328394772ea348b70c6415b6cbdefa0 /cryptography | |
| parent | 92c1f35054c79f3aef26712ac7ca16480f1847a0 (diff) | |
| download | cryptography-b1895f6f786b8be3bbaedf0b17ef1337b71bcfa1.tar.gz cryptography-b1895f6f786b8be3bbaedf0b17ef1337b71bcfa1.tar.bz2 cryptography-b1895f6f786b8be3bbaedf0b17ef1337b71bcfa1.zip | |
Steps to get this running on py32 and py33 again
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/bindings/openssl/api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/bindings/openssl/api.py b/cryptography/bindings/openssl/api.py index 24679966..7594fba6 100644 --- a/cryptography/bindings/openssl/api.py +++ b/cryptography/bindings/openssl/api.py @@ -61,8 +61,8 @@ class API(object): def create_block_cipher_context(self, cipher, mode): ctx = self._ffi.new("EVP_CIPHER_CTX *") # TODO: compute name using a better algorithm - ciphername = b"{}-{}-{}".format(cipher.name, len(cipher.key) * 8, mode.name) - evp_cipher = self._lib.EVP_get_cipherbyname(ciphername) + ciphername = "{0}-{1}-{2}".format(cipher.name, len(cipher.key) * 8, mode.name) + evp_cipher = self._lib.EVP_get_cipherbyname(ciphername.encode("ascii")) if evp_cipher == self._ffi.NULL: raise OpenSSLError(self) # TODO: only use the key and initialization_vector as needed. Sometimes |
