~vcs-imports/putty/master

Viewing all changes in revision 5066.

  • Committer: Simon Tatham
  • Date: 2018-12-01 17:02:20 UTC
  • Revision ID: git-v1:1e1f06b2ecb95bfa04a38c4cfe43413df9d30671
Check by assertion that we cross-certified the right key type.

The flag 'cross_certifying' in the SSH-2 transport layer state is now
a pointer to the host key algorithm we expect to be certifying,
instead of a plain bool. That lets me check by assertion that it's
what we expected it to be after all the complicated key exchange has
happened.

(I have no reason to think this _will_ go wrong. When we cross-
certify, the desired algorithm should be the only one we put into our
KEXINIT host key algorithm list, so it should also be the only one we
can come out of the far end of KEXINIT having selected. But if
anything ever does go wrong with my KEXINIT handling then I'd prefer
an assertion failure to silently certifying the wrong key, and also,
this makes it clearer to static analysers - and perhaps also humans
reading the code - what we expect the situation to be.)

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: