On Tue, Jul 28, 2015 at 11:24:48AM +0200, Pino Toscano wrote: > Useful to know whether a Sigchecker instance is verifying signatures, > hence it is possible to decide whether download signed content or not. > --- > builder/sigchecker.ml | 3 +++ > builder/sigchecker.mli | 4 ++++ > 2 files changed, 7 insertions(+) > > diff --git a/builder/sigchecker.ml b/builder/sigchecker.ml > index 06c60ae..86e60ac 100644 > --- a/builder/sigchecker.ml > +++ b/builder/sigchecker.ml > @@ -163,6 +163,9 @@ and getxdigit = function > | 'A'..'F' as c -> Some (Char.code c - Char.code 'A') > | _ -> None > > +let verifying_signatures t = > + t.check_signature > + > let rec verify t filename = > if t.check_signature then ( > let args = quote filename in > diff --git a/builder/sigchecker.mli b/builder/sigchecker.mli > index 47bf2a3..f233514 100644 > --- a/builder/sigchecker.mli > +++ b/builder/sigchecker.mli > @@ -20,6 +20,10 @@ type t > > val create : gpg:string -> gpgkey:Utils.gpgkey_type -> check_signature:bool > -> t > > +val verifying_signatures : t -> bool > +(** Return whether signatures are being verified by this > + Sigchecker.t. *) > + > val verify : t -> string -> unit > (** Verify the file is signed (if check_signature is true). *)
Exposes a field from the 't' type, so ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html _______________________________________________ Libguestfs mailing list [email protected] https://www.redhat.com/mailman/listinfo/libguestfs
