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

Side by Side Diff: src/platform/vboot_reference/tests/rsa_padding_test.c

Issue 858008: VBoot Reference: Fix many memory leaks. (Closed)
Patch Set: Created 10 years, 9 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
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 #include "rsa_padding_test.h" 6 #include "rsa_padding_test.h"
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 9
10 #include "file_keys.h" 10 #include "file_keys.h"
(...skipping 23 matching lines...) Expand all
34 for (i = 1; i < sizeof(signatures) / sizeof(signatures[0]); i++) { 34 for (i = 1; i < sizeof(signatures) / sizeof(signatures[0]); i++) {
35 if (RSAVerify(key, signatures[i], RSA1024NUMBYTES, 0, 35 if (RSAVerify(key, signatures[i], RSA1024NUMBYTES, 0,
36 test_message_sha1_hash)) { 36 test_message_sha1_hash)) {
37 fprintf(stderr, "RSA Padding Test vector %d FAILED!\n", i); 37 fprintf(stderr, "RSA Padding Test vector %d FAILED!\n", i);
38 error = 255; /* Test failure. */ 38 error = 255; /* Test failure. */
39 } 39 }
40 } 40 }
41 if (!error) 41 if (!error)
42 fprintf(stderr, "RSA Padding Test PASSED for all test vectors."); 42 fprintf(stderr, "RSA Padding Test PASSED for all test vectors.");
43 43
44 RSAPublicKeyFree(key);
44 return error; 45 return error;
45 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698