get_sha1_with_context: dynamically allocate oc->path