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

Unified Diff: net/third_party/nss/ssl/sslplatf.c

Issue 4825003: ssl3_PlatformSignHashes should set buf->len to the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/third_party/nss/ssl/sslplatf.c
===================================================================
--- net/third_party/nss/ssl/sslplatf.c (revision 65888)
+++ net/third_party/nss/ssl/sslplatf.c (working copy)
@@ -260,7 +260,6 @@
ssl_MapLowLevelError(SSL_ERROR_SIGN_HASHES_FAILURE);
goto done;
}
- buf->len = signatureLen;
buf->data = (unsigned char *)PORT_Alloc(signatureLen);
if (!buf->data)
goto done; /* error code was set. */
@@ -270,6 +269,7 @@
ssl_MapLowLevelError(SSL_ERROR_SIGN_HASHES_FAILURE);
goto done;
}
+ buf->len = signatureLen;
/* CryptoAPI signs in little-endian, so reverse */
for (i = 0; i < buf->len / 2; ++i) {
@@ -424,7 +424,6 @@
goto done;
}
- buf->len = signatureLen;
buf->data = (unsigned char *)PORT_Alloc(signatureLen);
if (!buf->data)
goto done; /* error code was set. */
@@ -462,7 +461,7 @@
goto done;
}
- signatureData.Length = buf->len;
+ signatureData.Length = signatureLen;
signatureData.Data = (uint8*)buf->data;
cssmRv = CSSM_CSP_CreateSignatureContext(cspHandle, sigAlg, cssmCreds,
@@ -492,6 +491,7 @@
ssl_MapLowLevelError(SSL_ERROR_SIGN_HASHES_FAILURE);
goto done;
}
+ buf->len = signatureData.Length;
if (doDerEncode) {
SECItem derSig = {siBuffer, NULL, 0};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698