chiark / gitweb /
site: Read public peer keys from key file
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 18:21:11 +0000 (18:21 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 18:22:31 +0000 (18:22 +0000)
commit6030c68b54b7b0a61187cd362851dcdc278f9789
treec7de215c7ae86afd7645e67e957838c9cd593317
parent0abba5fdb68819b279ca1a74c16ed52824ebfb74
site: Read public peer keys from key file

Instead of a sigpubkey_if, we maintain a peer_keyset for the peer.

We try to get this from the new "peer-keys" configuration key which
specifies a file (to be parsed with the parser pubkeys.fl.pl).
Failing that we fall back to the old "key" (for key id 0000000000).

We actually keep up to two peer_keysets, because we don't want the set
to change during the middle of a key exchange.  (In the future, peer
keysets might change during operation.)  We make a "copy" (actually a
reference) at the start of key exchange.

We advertise the keyids we will accept in our MSG2/MSG3.  We expect
the peer to state in their MSG3/MSG4 which key they have actually
signed the message with.

This commit has a bug: it never calls sethash.  Our only algorithm
right now is rsa1 and needs sethash.  So attempts to use this will
segfault.

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