| OLD | NEW |
| 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 * Tests for firmware image library. | 5 * Tests for firmware image library. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 | 10 |
| 11 #include "cryptolib.h" | 11 #include "cryptolib.h" |
| 12 #include "file_keys.h" | 12 #include "file_keys.h" |
| 13 #include "firmware_image.h" | |
| 14 #include "host_common.h" | 13 #include "host_common.h" |
| 15 #include "test_common.h" | 14 #include "test_common.h" |
| 16 #include "utility.h" | 15 #include "utility.h" |
| 17 #include "vboot_common.h" | 16 #include "vboot_common.h" |
| 18 | 17 |
| 19 | 18 |
| 20 static void VerifyPublicKeyToRSA(const VbPublicKey* orig_key) { | 19 static void VerifyPublicKeyToRSA(const VbPublicKey* orig_key) { |
| 21 | 20 |
| 22 RSAPublicKey *rsa; | 21 RSAPublicKey *rsa; |
| 23 VbPublicKey *key = PublicKeyAlloc(orig_key->key_size, 0, 0); | 22 VbPublicKey *key = PublicKeyAlloc(orig_key->key_size, 0, 0); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 VerifyDigestTest(public_key, private_key); | 229 VerifyDigestTest(public_key, private_key); |
| 231 VerifyKernelPreambleTest(public_key, private_key); | 230 VerifyKernelPreambleTest(public_key, private_key); |
| 232 | 231 |
| 233 if (public_key) | 232 if (public_key) |
| 234 Free(public_key); | 233 Free(public_key); |
| 235 if (private_key) | 234 if (private_key) |
| 236 Free(private_key); | 235 Free(private_key); |
| 237 | 236 |
| 238 return error_code; | 237 return error_code; |
| 239 } | 238 } |
| OLD | NEW |