diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-04-04 22:10:38 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-04-04 22:10:38 +0000 |
commit | 8a725a843d51b4fe43e9653eea5442c368290fe2 (patch) | |
tree | fb02382127e5c2a833976ba49faaf486d482583f /cipher.c | |
parent | e683e7643997118ac51b18c073a6aba410c0cc3c (diff) |
- markus@cvs.openbsd.org 2002/04/03 09:26:11
[cipher.c myproposal.h]
re-add rijndael-cbc@lysator.liu.se for MacSSH; ash@lab.poc.net
Diffstat (limited to 'cipher.c')
-rw-r--r-- | cipher.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: cipher.c,v 1.54 2002/03/19 10:49:35 markus Exp $"); | 38 | RCSID("$OpenBSD: cipher.c,v 1.55 2002/04/03 09:26:11 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "log.h" | 41 | #include "log.h" |
@@ -72,6 +72,8 @@ struct Cipher { | |||
72 | { "aes128-cbc", SSH_CIPHER_SSH2, 16, 16, evp_rijndael }, | 72 | { "aes128-cbc", SSH_CIPHER_SSH2, 16, 16, evp_rijndael }, |
73 | { "aes192-cbc", SSH_CIPHER_SSH2, 16, 24, evp_rijndael }, | 73 | { "aes192-cbc", SSH_CIPHER_SSH2, 16, 24, evp_rijndael }, |
74 | { "aes256-cbc", SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, | 74 | { "aes256-cbc", SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, |
75 | { "rijndael-cbc@lysator.liu.se", | ||
76 | SSH_CIPHER_SSH2, 16, 32, evp_rijndael }, | ||
75 | 77 | ||
76 | { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL } | 78 | { NULL, SSH_CIPHER_ILLEGAL, 0, 0, NULL } |
77 | }; | 79 | }; |
@@ -584,7 +586,7 @@ cipher_get_keyiv(CipherContext *cc, u_char *iv, u_int len) | |||
584 | fatal("%s: wrong iv length %d != %d", __FUNCTION__, | 586 | fatal("%s: wrong iv length %d != %d", __FUNCTION__, |
585 | evplen, len); | 587 | evplen, len); |
586 | 588 | ||
587 | if (strncmp(c->name, "aes", 3) == 0) { | 589 | if (c->evptype == evp_rijndael) { |
588 | struct ssh_rijndael_ctx *aesc; | 590 | struct ssh_rijndael_ctx *aesc; |
589 | 591 | ||
590 | aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp); | 592 | aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp); |
@@ -629,7 +631,7 @@ cipher_set_keyiv(CipherContext *cc, u_char *iv) | |||
629 | if (evplen == 0) | 631 | if (evplen == 0) |
630 | return; | 632 | return; |
631 | 633 | ||
632 | if (strncmp(c->name, "aes", 3) == 0) { | 634 | if (c->evptype == evp_rijndael) { |
633 | struct ssh_rijndael_ctx *aesc; | 635 | struct ssh_rijndael_ctx *aesc; |
634 | 636 | ||
635 | aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp); | 637 | aesc = EVP_CIPHER_CTX_get_app_data(&cc->evp); |