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>
Mon, 30 Dec 2019 13:15:50 +0000 (13:15 +0000)
commitcc3ef0f24a77b1ef4b075bc33487bc0967ac56bb
tree97bcf1182fbb6fc34ef7c91e9976b3c2c10a6176
parent09fdba17b977a5f7485929845dd4f18278b6b00e
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