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>
Mon, 30 Dec 2019 13:15:50 +0000 (13:15 +0000)
commit5951262fe49989f10bff2daaa3af9d9bf6e48cb6
tree6de4ef921ac051ff658ebb2ffed722b1c518ba53
parentcc3ef0f24a77b1ef4b075bc33487bc0967ac56bb
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