summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-01-20 22:31:29 +1100
committerDamien Miller <djm@mindrot.org>2013-01-20 22:31:29 +1100
commitda5cc5d09a193f29d1a1e1c5a96e06980d240816 (patch)
tree02c48b4cc2843c6261ff65fb875dcc40f9aea030
parent13f5f768bc4861bff58074717fc19764ee347ac9 (diff)
- (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.
-rw-r--r--ChangeLog5
-rw-r--r--cipher-aes.c3
-rw-r--r--cipher-ctr.c3
-rw-r--r--openbsd-compat/openssl-compat.h12
4 files changed, 11 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6be8cd468..9132fb7c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
120130120
2 - (djm) [cipher-aes.c cipher-ctr.c openbsd-compat/openssl-compat.h]
3 Move prototypes for replacement ciphers to openssl-compat.h; fix EVP
4 prototypes for openssl-1.0.0-fips.
5
120130118 620130118
2 - (djm) OpenBSD CVS Sync 7 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2013/01/17 23:00:01 8 - 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
46 u_char r_iv[RIJNDAEL_BLOCKSIZE]; 46 u_char r_iv[RIJNDAEL_BLOCKSIZE];
47}; 47};
48 48
49const EVP_CIPHER * evp_rijndael(void);
50void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
51
52static int 49static int
53ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv, 50ssh_rijndael_init(EVP_CIPHER_CTX *ctx, const u_char *key, const u_char *iv,
54 int enc) 51 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 @@
34#include <openssl/aes.h> 34#include <openssl/aes.h>
35#endif 35#endif
36 36
37const EVP_CIPHER *evp_aes_128_ctr(void);
38void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
39
40struct ssh_aes_ctr_ctx 37struct ssh_aes_ctr_ctx
41{ 38{
42 AES_KEY aes_ctx; 39 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 @@
1/* $Id: openssl-compat.h,v 1.21 2013/01/09 05:42:49 djm Exp $ */ 1/* $Id: openssl-compat.h,v 1.22 2013/01/20 11:31:37 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -40,7 +40,7 @@
40# define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) 40# define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
41#endif 41#endif
42 42
43#if OPENSSL_VERSION_NUMBER < 0x1000000fL 43#if OPENSSL_VERSION_NUMBER < 0x10000001L
44# define LIBCRYPTO_EVP_INL_TYPE unsigned int 44# define LIBCRYPTO_EVP_INL_TYPE unsigned int
45#else 45#else
46# define LIBCRYPTO_EVP_INL_TYPE size_t 46# define LIBCRYPTO_EVP_INL_TYPE size_t
@@ -59,16 +59,16 @@
59# define EVP_aes_128_cbc evp_rijndael 59# define EVP_aes_128_cbc evp_rijndael
60# define EVP_aes_192_cbc evp_rijndael 60# define EVP_aes_192_cbc evp_rijndael
61# define EVP_aes_256_cbc evp_rijndael 61# define EVP_aes_256_cbc evp_rijndael
62extern const EVP_CIPHER *evp_rijndael(void); 62const EVP_CIPHER *evp_rijndael(void);
63extern void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); 63void ssh_rijndael_iv(EVP_CIPHER_CTX *, int, u_char *, u_int);
64#endif 64#endif
65 65
66#ifndef OPENSSL_HAVE_EVPCTR 66#ifndef OPENSSL_HAVE_EVPCTR
67#define EVP_aes_128_ctr evp_aes_128_ctr 67#define EVP_aes_128_ctr evp_aes_128_ctr
68#define EVP_aes_192_ctr evp_aes_128_ctr 68#define EVP_aes_192_ctr evp_aes_128_ctr
69#define EVP_aes_256_ctr evp_aes_128_ctr 69#define EVP_aes_256_ctr evp_aes_128_ctr
70extern const EVP_CIPHER *evp_aes_128_ctr(void); 70const EVP_CIPHER *evp_aes_128_ctr(void);
71extern void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, u_int); 71void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
72#endif 72#endif
73 73
74/* Avoid some #ifdef. Code that uses these is unreachable without GCM */ 74/* Avoid some #ifdef. Code that uses these is unreachable without GCM */