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

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

Issue 168903005: Ensure that RSA signatures have the correct length (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small correction to README.chromium. Created 6 years, 10 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
Index: third_party/tlslite/tlslite/utils/RSAKey.py
diff --git a/third_party/tlslite/tlslite/utils/RSAKey.py b/third_party/tlslite/tlslite/utils/RSAKey.py
index 37c292df5dc200ea6410b016e72eb89230897d90..1b917428f595e316d6c68098f53bd8c4b0594740 100644
--- a/third_party/tlslite/tlslite/utils/RSAKey.py
+++ b/third_party/tlslite/tlslite/utils/RSAKey.py
@@ -117,7 +117,7 @@ class RSAKey:
if m >= self.n:
raise ValueError()
c = self._rawPrivateKeyOp(m)
- sigBytes = numberToBytes(c)
+ sigBytes = numberToBytes(c, numBytes(self.n))
return sigBytes
def verify(self, sigBytes, bytes):
« no previous file with comments | « third_party/tlslite/patches/rsa_signature_length.patch ('k') | third_party/tlslite/tlslite/utils/cryptomath.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698