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

Unified Diff: third_party/tlslite/tlslite/utils/openssl_tripledes.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/openssl_rsakey.py ('k') | third_party/tlslite/tlslite/utils/pem.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_tripledes.py
diff --git a/third_party/tlslite/tlslite/utils/openssl_tripledes.py b/third_party/tlslite/tlslite/utils/openssl_tripledes.py
index 856c7af486a5a50cc15af199dba77c064b26b69a..15a68bb4e33d67e3cc89cff27cc6ee14a2915225 100644
--- a/third_party/tlslite/tlslite/utils/openssl_tripledes.py
+++ b/third_party/tlslite/tlslite/utils/openssl_tripledes.py
@@ -1,7 +1,10 @@
+# Author: Trevor Perrin
+# See the LICENSE file for legal information regarding use of this file.
+
"""OpenSSL/M2Crypto 3DES implementation."""
-from cryptomath import *
-from tripledes import *
+from .cryptomath import *
+from .tripledes import *
if m2cryptoLoaded:
@@ -27,7 +30,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):
TripleDES.decrypt(self, ciphertext)
@@ -41,4 +44,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/openssl_rsakey.py ('k') | third_party/tlslite/tlslite/utils/pem.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698