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 * Common functions used by tests. | 5 * Common functions used by tests. |
6 */ | 6 */ |
7 | 7 |
8 #include "test_common.h" | 8 #include "test_common.h" |
9 | 9 |
10 #include <stdio.h> | 10 #include <stdio.h> |
11 | 11 |
| 12 #include "cryptolib.h" |
12 #include "file_keys.h" | 13 #include "file_keys.h" |
13 #include "rsa_utility.h" | |
14 #include "utility.h" | 14 #include "utility.h" |
15 | 15 |
16 /* ANSI Color coding sequences. */ | 16 /* ANSI Color coding sequences. */ |
17 #define COL_GREEN "\e[1;32m" | 17 #define COL_GREEN "\e[1;32m" |
18 #define COL_RED "\e[0;31m" | 18 #define COL_RED "\e[0;31m" |
19 #define COL_STOP "\e[m" | 19 #define COL_STOP "\e[m" |
20 | 20 |
21 /* Global test success flag. */ | 21 /* Global test success flag. */ |
22 int gTestSuccess = 1; | 22 int gTestSuccess = 1; |
23 | 23 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 if (!image) | 242 if (!image) |
243 return NULL; | 243 return NULL; |
244 if (is_corrupt) { | 244 if (is_corrupt) { |
245 /* Invalidate image. */ | 245 /* Invalidate image. */ |
246 Memset(image->kernel_data, 'X', image->options.kernel_len); | 246 Memset(image->kernel_data, 'X', image->options.kernel_len); |
247 } | 247 } |
248 kernel_blob = GetKernelBlob(image, &len); | 248 kernel_blob = GetKernelBlob(image, &len); |
249 KernelImageFree(image); | 249 KernelImageFree(image); |
250 return kernel_blob; | 250 return kernel_blob; |
251 } | 251 } |
OLD | NEW |