From 06b33aa0e83163f3dcd679317afec1ee95910512 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Thu, 15 Feb 2001 03:01:59 +0000 Subject: - markus@cvs.openbsd.org 2001/02/11 12:59:25 [Makefile.in sshd.8 sshconnect2.c readconf.h readconf.c packet.c sshd.c ssh.c ssh.1 servconf.h servconf.c myproposal.h kex.h kex.c] 1) clean up the MAC support for SSH-2 2) allow you to specify the MAC with 'ssh -m' 3) or the 'MACs' keyword in ssh(d)_config 4) add hmac-{md5,sha1}-96 ok stevesk@, provos@ --- ssh.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'ssh.c') diff --git a/ssh.c b/ssh.c index 4ca1e7bf8..1b022402d 100644 --- a/ssh.c +++ b/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.94 2001/02/10 01:46:28 markus Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.95 2001/02/11 12:59:25 markus Exp $"); #include #include @@ -65,6 +65,8 @@ RCSID("$OpenBSD: ssh.c,v 1.94 2001/02/10 01:46:28 markus Exp $"); #include "tildexpand.h" #include "dispatch.h" #include "misc.h" +#include "kex.h" +#include "mac.h" #ifdef HAVE___PROGNAME extern char *__progname; @@ -305,7 +307,7 @@ main(int ac, char **av) opt = av[optind][1]; if (!opt) usage(); - if (strchr("eilcpLRo", opt)) { /* options with arguments */ + if (strchr("eilcmpLRo", opt)) { /* options with arguments */ optarg = av[optind] + 2; if (strcmp(optarg, "") == 0) { if (optind >= ac - 1) @@ -434,6 +436,14 @@ main(int ac, char **av) } } break; + case 'm': + if (mac_valid(optarg)) + options.macs = xstrdup(optarg); + else { + fprintf(stderr, "Unknown mac type '%s'\n", optarg); + exit(1); + } + break; case 'p': options.port = atoi(optarg); break; -- cgit v1.2.3