HomePhabricator

Clean up code that generates session keys

Authored by Simo Sorce <simo@redhat.com> on Oct 1 2018, 6:56 PM.

Description

Clean up code that generates session keys

This patch simply reworks the code to make it more understandable and
reduce if() branches.
It also avoids reallocs, and instead uses a support buffer to hold
intermediate results of the hmac function so that no buffer overrides
happen when the requested size is not an exact mutiple of the digest_len.

Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>

Details

Committed
asnThu, Mar 7, 12:03 PM
Parents
rLIBSSHc235841436ae: Add unit test for fn that generates session keys
Branches
Unknown
Tags
Unknown

Event Timeline