1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/ssh
Simon Tatham 42740a5455 Allow manually confirming and caching certified keys.
In the case where a server presents a host key signed by a different
certificate from the one you've configured, it need not _always_ be
evidence of wrongdoing. I can imagine situations in which two CAs
cover overlapping sets of things, and you don't want to blanket-trust
one of them, but you do want to connect to a specific host signed by
that one.

Accordingly, PuTTY's previous policy of unconditionally aborting the
connection if certificate validation fails (which was always intended
as a stopgap until I thought through what I wanted to replace it with)
is now replaced by fallback handling: we present the host key
fingerprint to the user and give them the option to accept and/or
cache it based on the public key itself.

This means that the certified key types have to have a representation
in the host key cache. So I've assigned each one a type id, and
generate the cache string itself by simply falling back to the base
key.

(Rationale for the latter: re-signing a public key with a different
certificate doesn't change the _private_ key, or the set of valid
signatures generated with it. So if you've been convinced for reasons
other than the certificate that a particular private key is in the
possession of $host, then proof of ownership of that private key
should be enough to convince you you're talking to $host no matter
what CA has signed the public half this week.)

We now offer to receive a given certified host key type if _either_ we
have at least one CA configured to trust that host, _or_ we have a
certified key of that type cached. (So once you've decided manually
that you trust a particular key, we can still receive that key and
authenticate the host with it, even if you later delete the CA record
that it didn't match anyway.)

One change from normal (uncertified) host key handling is that for
certified key types _all_ the host key prompts use the stronger
language, with "WARNING - POTENTIAL SECURITY BREACH!" rather than the
mild 'hmm, we haven't seen this host before'. Rationale: if you
expected this CA key and got that one, it _could_ be a bold-as-brass
MITM attempt in which someone hoped you'd accept their entire CA key.
The mild wording is only for the case where we had no previous
expectations _at all_ for the host to violate: not a CA _or_ a cached
key.
2022-07-17 14:11:38 +01:00
..
agentf.c
bpp1.c New Seat callback, seat_sent(). 2021-06-27 13:52:48 +01:00
bpp2.c New Seat callback, seat_sent(). 2021-06-27 13:52:48 +01:00
bpp-bare.c New Seat callback, seat_sent(). 2021-06-27 13:52:48 +01:00
bpp.h
ca-config.c Certificate trust scope: change to a boolean-expression system. 2022-06-25 14:32:23 +01:00
censor1.c
censor2.c
channel.h
CMakeLists.txt Move host CA config box out into its own source file. 2022-05-01 10:16:19 +01:00
common.c Allow manually confirming and caching certified keys. 2022-07-17 14:11:38 +01:00
connection1-client.c New Seat query, has_mixed_input_stream(). 2021-11-06 14:48:26 +00:00
connection1-server.c
connection1.c Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
connection1.h Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
connection2-client.c New Seat query, has_mixed_input_stream(). 2021-11-06 14:48:26 +00:00
connection2-server.c
connection2.c Fix linked-list mismanagement in global request queue. 2022-05-04 12:49:02 +01:00
connection2.h Richer data type for interactive prompt results. 2021-12-28 18:08:31 +00:00
crc-attack-detector.c
gss.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
gssc.c
gssc.h
kex2-client.c Allow manually confirming and caching certified keys. 2022-07-17 14:11:38 +01:00
kex2-server.c Refactor ecdh_kex into an organised vtable. 2022-04-15 17:46:06 +01:00
login1-server.c Localise user_input to SSH connection layers. 2021-09-14 14:05:13 +01:00
login1.c Allow manually confirming and caching certified keys. 2022-07-17 14:11:38 +01:00
mainchan.c mainchan.c: defer a couple of ssh_sw_abort. 2022-04-22 17:15:34 +01:00
nogss.c
nosharing.c
pgssapi.c
pgssapi.h
portfwd.c Pull out SOCKS protocol constants into a header. 2021-11-19 15:09:17 +00:00
ppl.h Support for detached certificates in userauth. 2022-04-25 15:09:31 +01:00
scpserver.c Generalise strbuf_catf() into put_fmt(). 2021-11-19 11:32:47 +00:00
server.c Centralise most details of host-key prompting. 2022-07-07 18:05:32 +01:00
server.h Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
sesschan.c Centralise most details of host-key prompting. 2022-07-07 18:05:32 +01:00
sftp.c
sftp.h Fix a batch of typos in comments and docs. 2022-01-03 06:40:51 +00:00
sftpcommon.c
sftpserver.c
sharing.c Update source file names in comments and docs. 2022-01-22 15:51:31 +00:00
signal-list.h
ssh.c Support for detached certificates in userauth. 2022-04-25 15:09:31 +01:00
transient-hostkey-cache.c
transport2.c Allow manually confirming and caching certified keys. 2022-07-17 14:11:38 +01:00
transport2.h Fix rekeying when using a certified host key. 2022-04-29 22:44:40 +01:00
ttymode-list.h
userauth2-client.c Support for detached certificates in userauth. 2022-04-25 15:09:31 +01:00
userauth2-server.c Uppity: add stunt options for trivial authentication. 2021-06-19 21:34:56 +01:00
verstring.c ssh/verstring.c: fix use of '\r' and '\n'. 2022-04-29 11:40:53 +01:00
x11fwd.c New API for plug_closing() with a custom type enum. 2021-11-06 14:48:26 +00:00
zlib.c