HomePhabricator

auth, pki: Calculate hash internally when signing/verifying

Authored by Anderson Toshiyuki Sasaki <ansasaki@redhat.com> on Apr 29 2019, 4:29 PM.

Description

auth, pki: Calculate hash internally when signing/verifying

This makes pki_do_sign() and pki_signature_verify() to receive the
original input instead of the pre-calculated hash. The hash is then
calculated internally.

The hash to be used inside the signature is decided earlier, when all
the information about the signature to be generated/verified is
available.

Simplify ssh_pki_do_sign() and ssh_srv_pki_do_sign_sessionid().

The tests were modified to use pki_do_sign() instead of
pki_do_sign_hash().

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>

Details

Committed
asnMay 13 2019, 4:37 PM
Parents
rLIBSSH58b3b2696c90: pki_crypto: Change SSH_KEYTYPE_ED25519 position in switches
Branches
Unknown
Tags
Unknown