Don't set any trust roots if --gossip is specified

- When the `--gossip` option is passed to `sq wot`, don't set any
    trust roots.
This commit is contained in:
Neal H. Walfield 2023-04-03 14:14:47 +02:00
parent cbcaa73e09
commit a8dd7061e6
No known key found for this signature in database
GPG Key ID: 6863C9AD5B4D22D3

View File

@ -515,9 +515,10 @@ pub fn dispatch(config: Config, cli: wot_cli::Command) -> Result<()> {
let n = wot::Network::new(cert_store)?;
let roots = wot::Roots::new(config.trust_roots());
let mut q = wot::QueryBuilder::new(&n);
q.roots(roots);
if ! cli.gossip {
q.roots(wot::Roots::new(config.trust_roots()));
}
if cli.certification_network {
q.certification_network();
}