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

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

Issue 1574005: VBoot Reference: Refactor Part 2 - Crypto Libraries (Closed)
Patch Set: . Created 10 years, 8 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 "cryptolib.h"
10 #include "file_keys.h" 11 #include "file_keys.h"
11 #include "rsa_utility.h"
12 12
13 int main(int argc, char* argv[]) { 13 int main(int argc, char* argv[]) {
14 int i; 14 int i;
15 int error = 0; 15 int error = 0;
16 RSAPublicKey* key; 16 RSAPublicKey* key;
17 if (argc != 2) { 17 if (argc != 2) {
18 fprintf(stderr, "Usage: %s <test public key>\n", argv[0]); 18 fprintf(stderr, "Usage: %s <test public key>\n", argv[0]);
19 return 1; 19 return 1;
20 } 20 }
21 key = RSAPublicKeyFromFile(argv[1]); 21 key = RSAPublicKeyFromFile(argv[1]);
(...skipping 15 matching lines...) Expand all
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 RSAPublicKeyFree(key);
45 return error; 45 return error;
46 } 46 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/rsa_padding_test.h ('k') | src/platform/vboot_reference/tests/rsa_verify_benchmark.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698