aboutsummaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
authorDirkjan Bussink <d.bussink@gmail.com>2019-02-08 19:44:36 +0000
committerAndreas Schneider <asn@cryptomilk.org>2019-02-22 15:31:02 +0100
commite4c7912b3531d7c7f0d5b354b20f44392be29c28 (patch)
tree4d9cda04c118b346a107ab78dc98e505d9d733a5 /src/session.c
parentc6608c921118268e233da03435d1d64f0e7449d7 (diff)
downloadlibssh-e4c7912b3531d7c7f0d5b354b20f44392be29c28.tar.gz
libssh-e4c7912b3531d7c7f0d5b354b20f44392be29c28.tar.xz
libssh-e4c7912b3531d7c7f0d5b354b20f44392be29c28.zip
Add flag for tracking EtM HMACs
This adds a flag to the type structures to track if we use a Encrypt-then-MAC cipher instead of Encrypt-and-MAC. EtM is a more secure hashing mechanism. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/session.c b/src/session.c
index 3b151bf7..d4600861 100644
--- a/src/session.c
+++ b/src/session.c
@@ -419,7 +419,7 @@ const char* ssh_get_cipher_out(ssh_session session) {
const char* ssh_get_hmac_in(ssh_session session) {
if ((session != NULL) &&
(session->current_crypto != NULL)) {
- return ssh_hmac_type_to_string(session->current_crypto->in_hmac);
+ return ssh_hmac_type_to_string(session->current_crypto->in_hmac, session->current_crypto->in_hmac_etm);
}
return NULL;
}
@@ -434,7 +434,7 @@ const char* ssh_get_hmac_in(ssh_session session) {
const char* ssh_get_hmac_out(ssh_session session) {
if ((session != NULL) &&
(session->current_crypto != NULL)) {
- return ssh_hmac_type_to_string(session->current_crypto->out_hmac);
+ return ssh_hmac_type_to_string(session->current_crypto->out_hmac, session->current_crypto->out_hmac_etm);
}
return NULL;
}