aboutsummaryrefslogtreecommitdiff
path: root/src/libmbedcrypto.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2018-10-01 12:56:32 -0400
committerAndreas Schneider <asn@cryptomilk.org>2019-03-07 12:03:27 +0100
commitc180211c6b804628d308743a51a0270873cf7c6f (patch)
treeaaa6c6d80d7d0d5d042b4a1ddd309236d2b97a2a /src/libmbedcrypto.c
parentc235841436ae45a0220097fa9721d09719700194 (diff)
downloadlibssh-c180211c6b804628d308743a51a0270873cf7c6f.tar.gz
libssh-c180211c6b804628d308743a51a0270873cf7c6f.tar.xz
libssh-c180211c6b804628d308743a51a0270873cf7c6f.zip
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>
Diffstat (limited to 'src/libmbedcrypto.c')
0 files changed, 0 insertions, 0 deletions