gabriel rosenkoetter on Wed, 24 Apr 2002 00:31:36 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] gpg --no-expensive-trust-checks


On Wed, Apr 24, 2002 at 12:02:07AM -0400, Bill Jonas wrote:
> $ man gpg
>        --no-expensive-trust-checks
>                  Experimental use only.

Yeah. I experimented. It don't do. :^>

> $ gpg --version
> gpg (GnuPG) 1.0.6

Same.

Let's see what the source says, shall we?

grappa:gnupg-1.0.6/g10% grep opt.no_expensive_trust_checks *
g10.c:          case oNoExpensiveTrustChecks: opt.no_expensive_trust_checks=1; break;
keylist.c:        else if ( opt.fast_list_mode || opt.no_expensive_trust_checks ) 
keylist.c:            && !opt.no_expensive_trust_checks  )
keylist.c:              else if ( opt.no_expensive_trust_checks ) {
keylist.c:            else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )

So the getopt foo in the main file sets things to 1 if it's passed
in, but the only thing that checks it is list_keyblock_colon(),
which only gets used if you supply the --with-colons flag:

list_keyblock( KBNODE keyblock, int secret )
{
    reorder_keyblock (keyblock);
    if (opt.with_colons)
        list_keyblock_colon (keyblock, secret );
    else
        list_keyblock_print (keyblock, secret );
}

The conspiracy's thicker than that, though, since there's not really
any talk of trust in list_keyblock_print(). Probably outside
function calls for trust checks... _list() doesn't even call
get_ownertrust_info(), which is pretty definitely where the slowness
lives, just at a glance... it's malloc()ing memory all over the
place, starting with a call to init_trustdb() every damn time. Maybe
sticking the trustdb crap in the (also experimental) gpg-agent will
make this crap more liveable by at least keeping the structures
around in memory.

It's past my bedtime, or else I'd play with this a little bit more.

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpcgOK9OhNhV.pgp
Description: PGP signature