lib/pull: Also do commit GPG verification before writing
authorColin Walters <walters@verbum.org>
Fri, 13 Oct 2017 18:51:34 +0000 (14:51 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 16 Oct 2017 15:32:39 +0000 (15:32 +0000)
commit1c108d1b68fd8792e799c5d7b139223178924f98
treeed9e9436bf00a35dcbd56d4ebc7076846b0d073c
parent22029d71c977674cfc1baebdbd9b769840a1b68c
lib/pull: Also do commit GPG verification before writing

I was working on a patch to do build on the work done to
import content objects async to do the same for metadata, but right
now we basically rely on writing them first to do the GPG verification
when scanning.

Things will be cleaner for that if we can pass the commit object directly into
`scan_commit_object()` and consistently use `gpg_verify_unwritten_commit()`.

We're careful here to continue to do it both ways (but at most one time), to
account for the case where a bad commit has been pulled and written - we need to
keep failing GPG verification there.

Closes: #1269
Approved by: jlebon
src/libostree/ostree-repo-pull.c