]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
openssl: Properly honor OPENSSL_NO_* defines
authorTobias Brunner <tobias@strongswan.org>
Thu, 31 Jan 2013 16:33:23 +0000 (17:33 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 31 Jan 2013 16:33:23 +0000 (17:33 +0100)
src/libstrongswan/plugins/openssl/openssl_diffie_hellman.c
src/libstrongswan/plugins/openssl/openssl_ec_private_key.c
src/libstrongswan/plugins/openssl/openssl_ec_public_key.c
src/libstrongswan/plugins/openssl/openssl_hmac.c
src/libstrongswan/plugins/openssl/openssl_rsa_private_key.c
src/libstrongswan/plugins/openssl/openssl_rsa_public_key.c
src/libstrongswan/plugins/openssl/openssl_sha1_prf.c

index 4dc5663f170809b3396a8c1ebb02dda39c5724a2..ff33824736667d4bdede6b3db63277598a191359 100644 (file)
  * for more details.
  */
 
+#include <openssl/opensslconf.h>
+
+#ifndef OPENSSL_NO_DH
+
 #include <openssl/dh.h>
 
 #include "openssl_diffie_hellman.h"
@@ -193,3 +197,5 @@ openssl_diffie_hellman_t *openssl_diffie_hellman_create(
 
        return &this->public;
 }
+
+#endif /* OPENSSL_NO_DH */
index d350d050b0520902b618adb6acb643cacc951426..12f264267efc3eecc014a987cfcb14734011b7fb 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <openssl/opensslconf.h>
 
-#ifndef OPENSSL_NO_EC
+#ifndef OPENSSL_NO_ECDSA
 
 #include "openssl_ec_private_key.h"
 #include "openssl_ec_public_key.h"
@@ -423,5 +423,4 @@ error:
        destroy(this);
        return NULL;
 }
-#endif /* OPENSSL_NO_EC */
-
+#endif /* OPENSSL_NO_ECDSA */
index 3f5125b31e3be0d4c6124985871b1acafb0fdcb4..c8a45f79addaec6ceba8e84df3b4d574ae151ad8 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <openssl/opensslconf.h>
 
-#ifndef OPENSSL_NO_EC
+#ifndef OPENSSL_NO_ECDSA
 
 #include "openssl_ec_public_key.h"
 #include "openssl_util.h"
@@ -360,5 +360,5 @@ openssl_ec_public_key_t *openssl_ec_public_key_load(key_type_t type,
        }
        return &this->public;
 }
-#endif /* OPENSSL_NO_EC */
+#endif /* OPENSSL_NO_ECDSA */
 
index 5d05425d33273976d3d34a4cb1d40f59b3129537..4f0bcc7c3bde1108e146bf85f10df1d1fa6acea7 100644 (file)
  * THE SOFTWARE.
  */
 
+#include <openssl/opensslconf.h>
+
+#ifndef OPENSSL_NO_HMAC
+
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
 
@@ -189,3 +193,4 @@ signer_t *openssl_hmac_signer_create(integrity_algorithm_t algo)
        return NULL;
 }
 
+#endif /* OPENSSL_NO_HMAC */
index 926e5928c1d0f6e5fdcfe4ae9204a037ec263e57..fb86a6bf1b42e7f72b2f14a6fb5f4b4270a95832 100644 (file)
  * for more details.
  */
 
+#include <openssl/opensslconf.h>
+
+#ifndef OPENSSL_NO_RSA
+
 #include "openssl_rsa_private_key.h"
 #include "openssl_rsa_public_key.h"
 
@@ -599,3 +603,4 @@ openssl_rsa_private_key_t *openssl_rsa_private_key_connect(key_type_t type,
 #endif /* OPENSSL_NO_ENGINE */
 }
 
+#endif /* OPENSSL_NO_RSA */
index 0da5d251466d9000f46abbe67c5a85721c3fcb5e..bf71d79010b68512aebf9c741fa407403a20ebaf 100644 (file)
  * for more details.
  */
 
+#include <openssl/opensslconf.h>
+
+#ifndef OPENSSL_NO_RSA
+
 #include "openssl_rsa_public_key.h"
 
 #include <utils/debug.h>
@@ -388,3 +392,5 @@ openssl_rsa_public_key_t *openssl_rsa_public_key_load(key_type_t type,
        destroy(this);
        return NULL;
 }
+
+#endif /* OPENSSL_NO_RSA */
index 8501e2cd444007a9e6fd03a1d2a5d3738e300bb9..8c00e6a5763ea3a673c8b0d8b8ae4002c64a1b3d 100644 (file)
  * for more details.
  */
 
+#include <openssl/opensslconf.h>
+
+#ifndef OPENSSL_NO_SHA1
+
 #include "openssl_sha1_prf.h"
 
 #include <openssl/sha.h>
@@ -143,3 +147,4 @@ openssl_sha1_prf_t *openssl_sha1_prf_create(pseudo_random_function_t algo)
        return &this->public;
 }
 
+#endif /* OPENSSL_NO_SHA1 */