From 25a02b0c95e01bc331267a1db0f62d3cbd7a0897 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 13 Dec 2012 08:18:56 +1100 Subject: - (djm) [configure.ac cipher-ctr.c] Adapt EVP AES CTR change to retain our compat code for older OpenSSL --- cipher-ctr.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cipher-ctr.c') diff --git a/cipher-ctr.c b/cipher-ctr.c index 04975b4b6..f053abe2e 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -16,6 +16,7 @@ */ #include "includes.h" +#ifndef OPENSSL_HAVE_EVPCTR #include #include @@ -144,3 +145,5 @@ evp_aes_128_ctr(void) #endif return (&aes_ctr); } + +#endif /* OPENSSL_HAVE_EVPCTR */ -- cgit v1.2.3 From da5cc5d09a193f29d1a1e1c5a96e06980d240816 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sun, 20 Jan 2013 22:31:29 +1100 Subject: - (djm) [cipher-aes.c cipher-ctr.c openbsd-compat/openssl-compat.h] Move prototypes for replacement ciphers to openssl-compat.h; fix EVP prototypes for openssl-1.0.0-fips. --- ChangeLog | 5 +++++ cipher-aes.c | 3 --- cipher-ctr.c | 3 --- openbsd-compat/openssl-compat.h | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'cipher-ctr.c') diff --git a/ChangeLog b/ChangeLog index 6be8cd468..9132fb7c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20130120 + - (djm) [cipher-aes.c cipher-ctr.c openbsd-compat/openssl-compat.h] + Move prototypes for replacement ciphers to openssl-compat.h; fix EVP + prototypes for openssl-1.0.0-fips. + 20130118 - (djm) OpenBSD CVS Sync - djm@cvs.openbsd.org 2013/01/17 23:00:01 diff --git a/cipher-aes.c b/cipher-aes.c index bfda6d2f2..07ec7aa5d 100644 --- a/cipher-aes.c +++ b/cipher-aes.c @@ -46,9 +46,6 @@ struct ssh_rijndael_ctx u_char r_iv[RIJNDAEL_BLOCKSIZE]; }; -const EVP_CIPHER * evp_rijndael(void); -void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); - static int ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, int enc) diff --git a/cipher-ctr.c b/cipher-ctr.c index f053abe2e..d1fe69f57 100644 --- a/cipher-ctr.c +++ b/cipher-ctr.c @@ -34,9 +34,6 @@ #include #endif -const EVP_CIPHER *evp_aes_128_ctr(void); -void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t); - struct ssh_aes_ctr_ctx { AES_KEY aes_ctx; diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 28da3be2d..eca62769e 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.h,v 1.21 2013/01/09 05:42:49 djm Exp $ */ +/* $Id: openssl-compat.h,v 1.22 2013/01/20 11:31:37 djm Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -40,7 +40,7 @@ # define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) #endif -#if OPENSSL_VERSION_NUMBER < 0x1000000fL +#if OPENSSL_VERSION_NUMBER < 0x10000001L # define LIBCRYPTO_EVP_INL_TYPE unsigned int #else # define LIBCRYPTO_EVP_INL_TYPE size_t @@ -59,16 +59,16 @@ # define EVP_aes_128_cbc evp_rijndael # define EVP_aes_192_cbc evp_rijndael # define EVP_aes_256_cbc evp_rijndael -extern const EVP_CIPHER *evp_rijndael(void); -extern void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); +const EVP_CIPHER *evp_rijndael(void); +void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); #endif #ifndef OPENSSL_HAVE_EVPCTR #define EVP_aes_128_ctr evp_aes_128_ctr #define EVP_aes_192_ctr evp_aes_128_ctr #define EVP_aes_256_ctr evp_aes_128_ctr -extern const EVP_CIPHER *evp_aes_128_ctr(void); -extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); +const EVP_CIPHER *evp_aes_128_ctr(void); +void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t); #endif /* Avoid some #ifdef. Code that uses these is unreachable without GCM */ -- cgit v1.2.3