From fc57f71fb1106a5b1b6d37cb595a21d36a049e7e Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sat, 7 Feb 2004 10:41:48 +1100 Subject: [PATCH] - dtucker@cvs.openbsd.org 2004/02/06 23:41:13 [cipher-ctr.c] Use EVP_CIPHER_CTX_key_length for key length. ok markus@ (This will fix builds with OpenSSL 0.9.5) --- ChangeLog | 9 ++++++++- cipher-ctr.c | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de37a0ba7..380fe60fe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +20040207 + - (dtucker) OpenBSD CVS Sync + - dtucker@cvs.openbsd.org 2004/02/06 23:41:13 + [cipher-ctr.c] + Use EVP_CIPHER_CTX_key_length for key length. ok markus@ + (This will fix builds with OpenSSL 0.9.5) + 20040206 - (dtucker) [acss.c acss.h] Fix $Id tags. - (dtucker) [cipher-acss.c cipher.c] Enable acss only if building with @@ -1811,4 +1818,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.3215 2004/02/06 10:29:41 dtucker Exp $ +$Id: ChangeLog,v 1.3216 2004/02/06 23:41:48 dtucker Exp $ diff --git a/cipher-ctr.c b/cipher-ctr.c index a9ddb8a66..395dabedd 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -14,7 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "includes.h" -RCSID("$OpenBSD: cipher-ctr.c,v 1.3 2003/11/21 11:57:03 djm Exp $"); +RCSID("$OpenBSD: cipher-ctr.c,v 1.4 2004/02/06 23:41:13 dtucker Exp $"); #include @@ -94,7 +94,8 @@ ssh_aes_ctr_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, EVP_CIPHER_CTX_set_app_data(ctx, c); } if (key != NULL) - AES_set_encrypt_key(key, ctx->key_len * 8, &c->aes_ctx); + AES_set_encrypt_key(key, EVP_CIPHER_CTX_key_length(ctx) * 8, + &c->aes_ctx); if (iv != NULL) memcpy(c->aes_counter, iv, AES_BLOCK_SIZE); return (1);