diff options
author | 1999-09-30 22:12:16 +0000 | |
---|---|---|
committer | 1999-09-30 22:12:16 +0000 | |
commit | 54f09657f38f37b0c2d42b341c68d308020b9a36 (patch) | |
tree | f1c6fa1f23afdbbc1800ebb3f53a015075b46cf9 | |
parent | We don't have an /etc/environment. (diff) | |
download | wireguard-openbsd-54f09657f38f37b0c2d42b341c68d308020b9a36.tar.xz wireguard-openbsd-54f09657f38f37b0c2d42b341c68d308020b9a36.zip |
better cipher name fix.
-rw-r--r-- | usr.bin/ssh/cipher.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c index 8a5c92d689e..b9956c03807 100644 --- a/usr.bin/ssh/cipher.c +++ b/usr.bin/ssh/cipher.c @@ -12,7 +12,7 @@ Created: Wed Apr 19 17:41:39 1995 ylo */ #include "includes.h" -RCSID("$Id: cipher.c,v 1.10 1999/09/30 18:41:24 provos Exp $"); +RCSID("$Id: cipher.c,v 1.11 1999/09/30 22:12:16 provos Exp $"); #include "ssh.h" #include "cipher.h" @@ -123,12 +123,12 @@ detect_cbc_attack(const unsigned char *src, int cipher.h. */ static char *cipher_names[] = { - NULL, /* no none */ - NULL, /* no idea */ - NULL, /* no des */ + "none", + "idea", + "des", "3des", - NULL, /* no tss */ - NULL, /* no rc4 */ + "tss", + "rc4", "blowfish" }; @@ -163,7 +163,8 @@ cipher_number(const char *name) { int i; for (i = 0; i < sizeof(cipher_names) / sizeof(cipher_names[0]); i++) - if (cipher_names[i] != NULL && strcmp(cipher_names[i], name) == 0) + if (strcmp(cipher_names[i], name) == 0 && + (cipher_mask() & (1 << i))) return i; return -1; } |