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

Side by Side Diff: host/lib/host_signature.c

Issue 2871033: Switch to using .vbprivk for signing everything now. (Closed) Base URL: ssh://git@chromiumos-git//vboot_reference.git
Patch Set: Okay, now tests pass again. Created 10 years, 5 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 * Host functions for signature generation. 5 * Host functions for signature generation.
6 */ 6 */
7 7
8 /* TODO: change all 'return 0', 'return 1' into meaningful return codes */ 8 /* TODO: change all 'return 0', 'return 1' into meaningful return codes */
9 9
10 #define OPENSSL_NO_SHA 10 #define OPENSSL_NO_SHA
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 /* Sign the signature_digest into our output buffer */ 119 /* Sign the signature_digest into our output buffer */
120 rv = RSA_private_encrypt(signature_digest_len, /* Input length */ 120 rv = RSA_private_encrypt(signature_digest_len, /* Input length */
121 signature_digest, /* Input data */ 121 signature_digest, /* Input data */
122 GetSignatureData(sig), /* Output sig */ 122 GetSignatureData(sig), /* Output sig */
123 key->rsa_private_key, /* Key to use */ 123 key->rsa_private_key, /* Key to use */
124 RSA_PKCS1_PADDING); /* Padding to use */ 124 RSA_PKCS1_PADDING); /* Padding to use */
125 Free(signature_digest); 125 Free(signature_digest);
126 126
127 if (-1 == rv) { 127 if (-1 == rv) {
128 debug("SignatureBuf(): RSA_private_encrypt() failed.\n"); 128 VBDEBUG(("SignatureBuf(): RSA_private_encrypt() failed.\n"));
129 Free(sig); 129 Free(sig);
130 return NULL; 130 return NULL;
131 } 131 }
132 132
133 /* Return the signature */ 133 /* Return the signature */
134 return sig; 134 return sig;
135 } 135 }
OLDNEW
« no previous file with comments | « host/lib/host_misc.c ('k') | host/lib/signature_digest.c » ('j') | utility/vbutil_key.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698