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

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

Issue 858373002: Update third_party/tlslite to 0.4.8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Finish fixing client auth Created 5 years, 11 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/cryptomath.py ('k') | third_party/tlslite/tlslite/utils/python_rsakey.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/utils/pycrypto_rsakey.py
diff --git a/third_party/tlslite/tlslite/utils/pycrypto_rsakey.py b/third_party/tlslite/tlslite/utils/pycrypto_rsakey.py
index 4de543638fb68ebc06d692eb06aab6b3cb52cfc6..d76ea2d1b13a6d44bfc1c6ee66759d454cb6ec2a 100644
--- a/third_party/tlslite/tlslite/utils/pycrypto_rsakey.py
+++ b/third_party/tlslite/tlslite/utils/pycrypto_rsakey.py
@@ -15,9 +15,9 @@ if pycryptoLoaded:
class PyCrypto_RSAKey(RSAKey):
def __init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0):
if not d:
- self.rsa = RSA.construct( (n, e) )
+ self.rsa = RSA.construct( (long(n), long(e)) )
else:
- self.rsa = RSA.construct( (n, e, d, p, q) )
+ self.rsa = RSA.construct( (long(n), long(e), long(d), long(p), long(q)) )
def __getattr__(self, name):
return getattr(self.rsa, name)
@@ -26,13 +26,11 @@ if pycryptoLoaded:
return self.rsa.has_private()
def _rawPrivateKeyOp(self, m):
- s = bytes(numberToByteArray(m, numBytes(self.n)))
- c = bytesToNumber(bytearray(self.rsa.decrypt((s,))))
+ c = self.rsa.decrypt((m,))
return c
def _rawPublicKeyOp(self, c):
- s = bytes(numberToByteArray(c, numBytes(self.n)))
- m = bytesToNumber(bytearray(self.rsa.encrypt(s, None)[0]))
+ m = self.rsa.encrypt(c, None)[0]
return m
def generate(bits):
« no previous file with comments | « third_party/tlslite/tlslite/utils/cryptomath.py ('k') | third_party/tlslite/tlslite/utils/python_rsakey.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698