lib: Add a lighter weight internal checksum wrapper
authorColin Walters <walters@verbum.org>
Fri, 6 Oct 2017 20:38:08 +0000 (16:38 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 10 Oct 2017 21:25:40 +0000 (21:25 +0000)
commit1c9975cbd12b05927e1969e5675479aea437188b
treedf0cf969cd9f8119b31a6508804900f63a554953
parentbba7eb80699cb789f31914bc98fc338c46237b37
lib: Add a lighter weight internal checksum wrapper

The faster (OpenSSL/GnuTLS) code lived in a `GInputStream` wrapper, and that
adds a lot of weight (GObject + vtable calls). Move it into a simple
autoptr-struct wrapper, and use it in the metadata path, so we're
now using the faster checksums there too.

This also drops a malloc there as the new API does hexdigest in place to a
buffer.

Prep for more work in the commit path to avoid `GInputStream` for local file
commits, and ["adopting" files](https://github.com/ostreedev/ostree/pull/1255).

Closes: #1256
Approved by: jlebon
src/libostree/ostree-core-private.h
src/libostree/ostree-core.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-static-delta-processing.c
src/libostree/ostree-sysroot-deploy.c
src/libotutil/ot-checksum-instream.c
src/libotutil/ot-checksum-instream.h
src/libotutil/ot-checksum-utils.c
src/libotutil/ot-checksum-utils.h