| 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 * Utility that outputs the cryptographic digest of a contents of a | 5 * Utility that outputs the cryptographic digest of a contents of a |
| 6 * file in a format that can be directly used to generate PKCS#1 v1.5 | 6 * file in a format that can be directly used to generate PKCS#1 v1.5 |
| 7 * signatures via the "openssl" command line utility. | 7 * signatures via the "openssl" command line utility. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 digestinfo_size_map[algorithm]); | 45 digestinfo_size_map[algorithm]); |
| 46 if (!signature_digest) | 46 if (!signature_digest) |
| 47 error_code = -1; | 47 error_code = -1; |
| 48 if(signature_digest && | 48 if(signature_digest && |
| 49 1 != fwrite(signature_digest, signature_digest_len, 1, stdout)) | 49 1 != fwrite(signature_digest, signature_digest_len, 1, stdout)) |
| 50 error_code = -1; | 50 error_code = -1; |
| 51 Free(signature_digest); | 51 Free(signature_digest); |
| 52 Free(buf); | 52 Free(buf); |
| 53 return error_code; | 53 return error_code; |
| 54 } | 54 } |
| OLD | NEW |