| 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 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 error_code = 255; | 207 error_code = 255; |
| 208 | 208 |
| 209 /* Test FirmwareImage verify operations. */ | 209 /* Test FirmwareImage verify operations. */ |
| 210 if (!VerifyFirmwareImageTest(image, root_key)) | 210 if (!VerifyFirmwareImageTest(image, root_key)) |
| 211 error_code = 255; | 211 error_code = 255; |
| 212 if (!VerifyFirmwareImageTamperTest(image, root_key)) | 212 if (!VerifyFirmwareImageTamperTest(image, root_key)) |
| 213 error_code = 255; | 213 error_code = 255; |
| 214 | 214 |
| 215 failure: | 215 failure: |
| 216 Free(firmware_blob); | 216 Free(firmware_blob); |
| 217 Free(image); | 217 FirmwareImageFree(image); |
| 218 Free(firmware_sign_key_buf); | 218 Free(firmware_sign_key_buf); |
| 219 Free(root_key_blob); | 219 Free(root_key_blob); |
| 220 Free(root_key); | 220 RSAPublicKeyFree(root_key); |
| 221 | 221 |
| 222 return error_code; | 222 return error_code; |
| 223 } | 223 } |
| OLD | NEW |