int ret = -1;
enum object_type type;
unsigned long size;
- void *buffer = read_sha1_file(oid->hash, &type, &size);
- const unsigned char *repl = lookup_replace_object(oid->hash);
+ void *buffer = read_object_file(oid, &type, &size);
+ const struct object_id *repl = lookup_replace_object(oid);
if (buffer) {
if (type == type_from_string(expected_type))
- ret = check_sha1_signature(repl, buffer, size, expected_type);
+ ret = check_object_signature(repl, buffer, size, expected_type);
free(buffer);
}
return ret;