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, 15 Feb 2020 21:56:50 +0000 (21:56 +0000)
commit2bd5686634133cda9a40c6050ac2174c11504f1e
tree54d08a09f85a744b27feed40ac22c87c648fb29d
parent99d512b7519c0a4e5c595e44c7533ae2130d0e08
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