chiark / gitweb /
site: Be able to use multiple private keys
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 18:17:05 +0000 (18:17 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 18:22:31 +0000 (18:22 +0000)
commit0abba5fdb68819b279ca1a74c16ed52824ebfb74
treed8941cecd8a0432f56ad065fde509d274fb939f8
parent8f63ad5c9ee3ed0bda18d90347b5aefb645a04f6
site: Be able to use multiple private keys

Replace the single permanent sigprivkey_if with a reference to a
private key cache, privcache_if.  (We retain the old single privkey
variable as privkey_fixed, and set that if the cache is not
specified.)

When processing MSG1/MSG2, we hope the peer told us the keyids, of up
to MAX_SIG_KEYS, that it will accept.

When generating MSG3/MSG4, we feed those keyids to the cache to see if
we have any of them.  If not we log a message with the wanted keyids.

We have to provide type_is_msg23 and keyid_zero.

(The corresponding other half of this protocol is in the next commit.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README
site.c