summaryrefslogtreecommitdiffstats
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 eca62769..6c4d68de 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
-/* $Id: openssl-compat.h,v 1.22 2013/01/20 11:31:37 djm Exp $ */
+/* $Id: openssl-compat.h,v 1.23 2013/02/10 23:39:15 djm Exp $ */
/*
* 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);
# define EVP_CTRL_GCM_GET_TAG -1
#endif
+/* Replace missing EVP_CIPHER_CTX_ctrl() with something that returns failure */
+#ifndef HAVE_EVP_CIPHER_CTX_CTRL
+# ifdef OPENSSL_HAVE_EVPGCM
+# error AES-GCM enabled without EVP_CIPHER_CTX_ctrl /* shouldn't happen */
+# else
+# define EVP_CIPHER_CTX_ctrl(a,b,c,d) (0)
+# endif
+#endif
+
#if OPENSSL_VERSION_NUMBER < 0x00907000L
#define EVP_X_STATE(evp) &(evp).c
#define EVP_X_STATE_LEN(evp) sizeof((evp).c)