aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2017-10-23 16:33:28 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-12-15 12:00:49 +0100
commit110da49504e52780195a6029bac6720129434f6c (patch)
tree17e004544cdd3372e0d5efd13e19a3714b242661 /src
parentf3754dc072df7a264c7db28a02604024f3f289b3 (diff)
downloadlibssh-110da49504e52780195a6029bac6720129434f6c.tar.gz
libssh-110da49504e52780195a6029bac6720129434f6c.tar.xz
libssh-110da49504e52780195a6029bac6720129434f6c.zip
config: support for MACs
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/config.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index 8419d070..330fb7ee 100644
--- a/src/config.c
+++ b/src/config.c
@@ -49,6 +49,7 @@ enum ssh_config_opcode_e {
SOC_USERNAME,
SOC_IDENTITY,
SOC_CIPHERS,
+ SOC_MACS,
SOC_COMPRESSION,
SOC_TIMEOUT,
SOC_PROTOCOL,
@@ -85,6 +86,7 @@ static struct ssh_config_keyword_table_s ssh_config_keyword_table[] = {
{ "user", SOC_USERNAME },
{ "identityfile", SOC_IDENTITY },
{ "ciphers", SOC_CIPHERS },
+ { "macs", SOC_MACS },
{ "compression", SOC_COMPRESSION },
{ "connecttimeout", SOC_TIMEOUT },
{ "protocol", SOC_PROTOCOL },
@@ -420,6 +422,13 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
ssh_options_set(session, SSH_OPTIONS_CIPHERS_S_C, p);
}
break;
+ case SOC_MACS:
+ p = ssh_config_get_str_tok(&s, NULL);
+ if (p && *parsing) {
+ ssh_options_set(session, SSH_OPTIONS_HMAC_C_S, p);
+ ssh_options_set(session, SSH_OPTIONS_HMAC_S_C, p);
+ }
+ break;
case SOC_COMPRESSION:
i = ssh_config_get_yesno(&s, -1);
if (i >= 0 && *parsing) {