From 8e0c047031d69bdf882f550886e3dd43afd8db05 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Thu, 22 Nov 2018 15:57:37 +0100 Subject: packet: Introduce a new function to access crypto And remove most of the direct access to the structure throughout the code Signed-off-by: Jakub Jelen Reviewed-by: Daiki Ueno Reviewed-by: Andreas Schneider --- src/messages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/messages.c') diff --git a/src/messages.c b/src/messages.c index 4c83cf0b..9be800bb 100644 --- a/src/messages.c +++ b/src/messages.c @@ -683,13 +683,13 @@ static ssh_buffer ssh_msg_userauth_build_digest(ssh_session session, const char *service, ssh_string algo) { - struct ssh_crypto_struct *crypto = - session->current_crypto ? session->current_crypto : - session->next_crypto; + struct ssh_crypto_struct *crypto = NULL; ssh_buffer buffer; ssh_string str=NULL; int rc; + crypto = ssh_packet_get_current_crypto(session, SSH_DIRECTION_IN); + buffer = ssh_buffer_new(); if (buffer == NULL) { return NULL; -- cgit v1.2.3