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

Side by Side Diff: firmware/lib/cryptolib/rsa.c

Issue 2871019: More cleanup of MSVC errors (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 6 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 unified diff | Download patch
« firmware/Makefile ('K') | « firmware/lib/cgptlib/include/gpt.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 /* Implementation of RSA signature verification which uses a pre-processed 6 /* Implementation of RSA signature verification which uses a pre-processed
7 * key for computation. The code extends Android's RSA verification code to 7 * key for computation. The code extends Android's RSA verification code to
8 * support multiple RSA key lengths and hash digest algorithms. 8 * support multiple RSA key lengths and hash digest algorithms.
9 */ 9 */
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 #ifndef NDEBUG 163 #ifndef NDEBUG
164 /* TODO(gauravsh): Replace with a macro call for logging. */ 164 /* TODO(gauravsh): Replace with a macro call for logging. */
165 debug("Padding: Expecting = %02x Got = %02x\n", padding[i], 165 debug("Padding: Expecting = %02x Got = %02x\n", padding[i],
166 buf[i]); 166 buf[i]);
167 #endif 167 #endif
168 success = 0; 168 success = 0;
169 } 169 }
170 } 170 }
171 171
172 /* Check if digest matches. */ 172 /* Check if digest matches. */
173 for (; i < sig_len; ++i) { 173 for (; i < (int)sig_len; ++i) {
174 if (buf[i] != *hash++) { 174 if (buf[i] != *hash++) {
175 #ifndef NDEBUG 175 #ifndef NDEBUG
176 /* TODO(gauravsh): Replace with a macro call for logging. */ 176 /* TODO(gauravsh): Replace with a macro call for logging. */
177 debug("Digest: Expecting = %02x Got = %02x\n", padding[i], 177 debug("Digest: Expecting = %02x Got = %02x\n", padding[i],
178 buf[i]); 178 buf[i]);
179 #endif 179 #endif
180 success = 0; 180 success = 0;
181 } 181 }
182 } 182 }
183 183
184 Free(buf); 184 Free(buf);
185 185
186 return success; 186 return success;
187 } 187 }
OLDNEW
« firmware/Makefile ('K') | « firmware/lib/cgptlib/include/gpt.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698