[cipher-ctr.c]
     Use EVP_CIPHER_CTX_key_length for key length.  ok markus@
     (This will fix builds with OpenSSL 0.9.5)
This commit is contained in:
Darren Tucker 2004-02-07 10:41:48 +11:00
parent 074593538a
commit fc57f71fb1
2 changed files with 11 additions and 3 deletions

View File

@ -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 $

View File

@ -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 <openssl/evp.h>
@ -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);