summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-02-11 12:59:27 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-02-11 12:59:27 +0000
commit6cd470778fe498d5509d5098522743c94a3f3a81 (patch)
tree803d6ea76487c5272d9bca5d3a8e4ddf9ebe05c2 /usr.bin/ssh/ssh.c
parent8892fc1a51799002a13e596d5e2d4b118335553b (diff)
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@
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 5dd9a8bef3f..ec76e060310 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/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 <openssl/evp.h>
#include <openssl/err.h>
@@ -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"
extern char *__progname;
@@ -292,7 +294,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)
@@ -421,6 +423,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;