- 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@
diff --git a/ssh.c b/ssh.c
index 4ca1e7b..1b02240 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 <openssl/evp.h>
#include <openssl/err.h>
@@ -65,6 +65,8 @@
#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 @@
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 @@
}
}
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;