Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: src/platform/vboot_reference/utils/signature_digest.c

Issue 578025: Refactor code from test/ to utils/ since they are not just used by tests. (Closed)
Patch Set: Fix nits. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 message digest of the contents of a file in a 5 * Utility that outputs the message digest of the contents of a file in a
6 * format that can be used as input to OpenSSL for an RSA signature. 6 * format that can be used as input to OpenSSL for an RSA signature.
7 * Needed until the stable OpenSSL release supports SHA-256/512 digests for 7 * Needed until the stable OpenSSL release supports SHA-256/512 digests for
8 * RSA signatures. 8 * RSA signatures.
9 * Outputs DigestInfo || Digest where DigestInfo is the OID depending on the 9 * Outputs DigestInfo || Digest where DigestInfo is the OID depending on the
10 * choice of the hash algorithm (see padding.c). 10 * choice of the hash algorithm (see padding.c).
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 write(1, info_digest, hash_size_map[algorithm] + 59 write(1, info_digest, hash_size_map[algorithm] +
60 digestinfo_size_map[algorithm]); 60 digestinfo_size_map[algorithm]);
61 61
62 failure: 62 failure:
63 free(digest); 63 free(digest);
64 free(info_digest); 64 free(info_digest);
65 free(signature); 65 free(signature);
66 66
67 return 0; 67 return 0;
68 } 68 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utils/sign_data.sh ('k') | src/platform/vboot_reference/utils/verify_data.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698