HomePhabricator

kex: honor client preference for rsa-sha2-{256,512} host key algorithms

Authored by simonsj on Feb 5 2019, 12:21 AM.

Description

kex: honor client preference for rsa-sha2-{256,512} host key algorithms

Ensure to honor the client preference ordering when enabling one of
the RFC8332 RSA signature extensions (rsa-sha2-{256,512}).

Before this change, libssh unconditionally selects the rsa-sha2-512
algorithm for clients which may have offered "rsa-sha2-256,rsa-sha2-512".

The change can be observed before-and-after with the pkd tests:

./pkd_hello -t torture_pkd_openssh_rsa_rsa_sha2_256_512

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 5d279a7ad7fc69c339ca89caf334b479ba787f70)

Details

Committed
asnFeb 7 2019, 2:22 PM
Parents
rLIBSSHe05e4ae9712b: pki_crypto: plug pki_signature_from_blob leaks
Branches
Unknown
Tags
Unknown