Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: third_party/tlslite/tlslite/utils/openssl_aes.py

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Executable bit and --similarity=80 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tlslite/tlslite/utils/keyfactory.py ('k') | third_party/tlslite/tlslite/utils/openssl_rc4.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/utils/openssl_aes.py
diff --git a/third_party/tlslite/tlslite/utils/openssl_aes.py b/third_party/tlslite/tlslite/utils/openssl_aes.py
index c2925d3c1717647e870c8cec83f2544968f4cc7f..658cf8303d473e2aa167d6671e0b899abf6be1b9 100644
--- a/third_party/tlslite/tlslite/utils/openssl_aes.py
+++ b/third_party/tlslite/tlslite/utils/openssl_aes.py
@@ -1,7 +1,10 @@
+# Author: Trevor Perrin
+# See the LICENSE file for legal information regarding use of this file.
+
"""OpenSSL/M2Crypto AES implementation."""
-from cryptomath import *
-from aes import *
+from .cryptomath import *
+from .aes import *
if m2cryptoLoaded:
@@ -32,7 +35,7 @@ if m2cryptoLoaded:
ciphertext = m2.cipher_update(context, plaintext)
m2.cipher_ctx_free(context)
self.IV = ciphertext[-self.block_size:]
- return ciphertext
+ return bytearray(ciphertext)
def decrypt(self, ciphertext):
AES.decrypt(self, ciphertext)
@@ -46,4 +49,4 @@ if m2cryptoLoaded:
plaintext = plaintext[:len(ciphertext)]
m2.cipher_ctx_free(context)
self.IV = ciphertext[-self.block_size:]
- return plaintext
+ return bytearray(plaintext)
« no previous file with comments | « third_party/tlslite/tlslite/utils/keyfactory.py ('k') | third_party/tlslite/tlslite/utils/openssl_rc4.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698