summaryrefslogtreecommitdiff
path: root/openbsd-compat/openssl-compat.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-02-11 10:39:12 +1100
committerDamien Miller <djm@mindrot.org>2013-02-11 10:39:12 +1100
commitb6f73b3af6fa14df1306d763dd7ec38f68de6f79 (patch)
treef5f8780e1b63d379a66130e8e0db035deceecd6a /openbsd-compat/openssl-compat.h
parent951b53b1bede98fdcfeeac8c5c00dbf3948d9b75 (diff)
- (djm) [configure.ac openbsd-compat/openssl-compat.h] Repair build on old
libcrypto that lacks EVP_CIPHER_CTX_ctrl
Diffstat (limited to 'openbsd-compat/openssl-compat.h')
-rw-r--r--openbsd-compat/openssl-compat.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index eca62769e..6c4d68def 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.h,v 1.22 2013/01/20 11:31:37 djm Exp $ */ 1/* $Id: openssl-compat.h,v 1.23 2013/02/10 23:39:15 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>
@@ -79,6 +79,15 @@ void ssh_aes_ctr_iv(EVP_CIPHER_CTX *, int, u_char *, size_t);
79# define EVP_CTRL_GCM_GET_TAG -1 79# define EVP_CTRL_GCM_GET_TAG -1
80#endif 80#endif
81 81
82/* Replace missing EVP_CIPHER_CTX_ctrl() with something that returns failure */
83#ifndef HAVE_EVP_CIPHER_CTX_CTRL
84# ifdef OPENSSL_HAVE_EVPGCM
85# error AES-GCM enabled without EVP_CIPHER_CTX_ctrl /* shouldn't happen */
86# else
87# define EVP_CIPHER_CTX_ctrl(a,b,c,d) (0)
88# endif
89#endif
90
82#if OPENSSL_VERSION_NUMBER < 0x00907000L 91#if OPENSSL_VERSION_NUMBER < 0x00907000L
83#define EVP_X_STATE(evp) &(evp).c 92#define EVP_X_STATE(evp) &(evp).c
84#define EVP_X_STATE_LEN(evp) sizeof((evp).c) 93#define EVP_X_STATE_LEN(evp) sizeof((evp).c)