chiark / gitweb /
make-secnet-sites: Rework with new `inpub' class
The use of k.forsites(,None,) was rather unprincipled and required a
strange comment. Instead, invent a `forpub' method for this use.
`forsites' can be implemented, for these classes, in terms of forpub.
Likewise testing whether the return from forsites was []; replace that
with an okforonlykey method. (The implementation uses the same trick
but now it's inside the class.)
We transpose the if `pubkeys_install' with the `for k' loop. The `not
pubkeys_install' arm is rather different now, accumulating in outk.
The one nontrivial consquence is that now if there are multiple
eligible keys to be written to a sites.conf, we fail, rather than just
choosing the first.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>