Chromium Code Reviews| 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 kernel image library. | 5 * Tests for kernel 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 /* Test Kernel blob verify operations. */ | 228 /* Test Kernel blob verify operations. */ |
| 229 if (!VerifyKernelTest(kernel_blob, firmware_key_blob)) | 229 if (!VerifyKernelTest(kernel_blob, firmware_key_blob)) |
| 230 error_code = 255; | 230 error_code = 255; |
| 231 | 231 |
| 232 /* Test KernelImage verify operations. */ | 232 /* Test KernelImage verify operations. */ |
| 233 if (!VerifyKernelImageTest(image, firmware_key)) | 233 if (!VerifyKernelImageTest(image, firmware_key)) |
| 234 error_code = 255; | 234 error_code = 255; |
| 235 if (!VerifyKernelImageTamperTest(image, firmware_key)) | 235 if (!VerifyKernelImageTamperTest(image, firmware_key)) |
| 236 error_code = 255; | 236 error_code = 255; |
| 237 | 237 |
| 238 failure: | 238 failure: |
|
Luigi Semenzato
2010/03/13 01:21:09
Nit: I wouldn't call this "failure" since you go t
gauravsh
2010/03/13 01:36:39
Yeah. I might change this at some point. I might j
| |
| 239 Free(kernel_blob); | 239 Free(kernel_blob); |
| 240 KernelImageFree(image); | 240 KernelImageFree(image); |
| 241 Free(kernel_sign_key_buf); | 241 Free(kernel_sign_key_buf); |
| 242 Free(firmware_key_blob); | 242 Free(firmware_key_blob); |
| 243 Free(firmware_key); | 243 RSAPublicKeyFree(firmware_key); |
| 244 | 244 |
| 245 return error_code; | 245 return error_code; |
| 246 } | 246 } |
| OLD | NEW |