sbvarsign: fix incorrect pointer in add_auth_descriptor

Brown paper bag time: we want to hash the variable data, not the stack.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
Jeremy Kerr 2012-09-05 11:17:08 +08:00
parent c933b5e8fd
commit cf747fcca3

View file

@ -246,7 +246,7 @@ static int add_auth_descriptor(struct varsign_context *ctx)
BIO_write(data_bio, &ctx->var_guid, sizeof(ctx->var_guid));
BIO_write(data_bio, &ctx->var_attrs, sizeof(ctx->var_attrs));
BIO_write(data_bio, &timestamp, sizeof(timestamp));
BIO_write(data_bio, &ctx->data, ctx->data_len);
BIO_write(data_bio, ctx->data, ctx->data_len);
md = EVP_get_digestbyname("SHA256");