From 116daf4c2f20b43a7ea349fcff407a4c85943d65 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 10 Oct 2001 07:55:02 +0000 Subject: [PATCH] To avoid commit wars over dependencies, let's make it so things that depend on the environment, like the presence of the OpenBSD crypto device or of Kerberos, do not change the dependencies within OpenSSL. --- crypto/engine/hw_openbsd_dev_crypto.c | 23 ++++++++++++----------- ssl/kssl.c | 4 +++- ssl/kssl.h | 2 ++ ssl/kssl_lcl.h | 4 ++-- ssl/s3_clnt.c | 2 -- ssl/s3_srvr.c | 2 -- ssl/ssl.h | 2 -- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/crypto/engine/hw_openbsd_dev_crypto.c b/crypto/engine/hw_openbsd_dev_crypto.c index f88a21b631..2e4b3de1e4 100644 --- a/crypto/engine/hw_openbsd_dev_crypto.c +++ b/crypto/engine/hw_openbsd_dev_crypto.c @@ -53,29 +53,30 @@ * */ -#ifndef OPENSSL_OPENBSD_DEV_CRYPTO - -void ENGINE_load_openbsd_dev_crypto(void) - { - /* This is a NOP unless OPENSSL_OPENBSD_DEV_CRYPTO is defined */ - return; - } - -#else /* OPENSSL_OPENBSD_DEV_CRYPTO */ - #include #include #include #include #include #include -#include #include #include #include "eng_int.h" /* Maybe this is needed? ... */ #include "../evp/evp_locl.h" +#ifndef OPENSSL_OPENBSD_DEV_CRYPTO + +void ENGINE_load_openbsd_dev_crypto(void) + { + /* This is a NOP unless OPENSSL_OPENBSD_DEV_CRYPTO is defined */ + return; + } + +#else /* OPENSSL_OPENBSD_DEV_CRYPTO */ + +#include + /****************************************************/ /* Declare the normal generic ENGINE stuff here ... */ diff --git a/ssl/kssl.c b/ssl/kssl.c index f1733048ed..e61b698062 100644 --- a/ssl/kssl.c +++ b/ssl/kssl.c @@ -67,7 +67,7 @@ */ #include -#ifndef OPENSSL_NO_KRB5 + #define _XOPEN_SOURCE /* glibc2 needs this to declare strptime() */ #include #include @@ -77,6 +77,8 @@ #include #include +#ifndef OPENSSL_NO_KRB5 + /* * When OpenSSL is built on Windows, we do not want to require that * the Kerberos DLLs be available in order for the OpenSSL DLLs to diff --git a/ssl/kssl.h b/ssl/kssl.h index 50480f6a31..cf7ebdd168 100644 --- a/ssl/kssl.h +++ b/ssl/kssl.h @@ -63,6 +63,8 @@ #ifndef KSSL_H #define KSSL_H +#include + #ifndef OPENSSL_NO_KRB5 #include diff --git a/ssl/kssl_lcl.h b/ssl/kssl_lcl.h index 37c2157d88..4cd8dd2d7f 100644 --- a/ssl/kssl_lcl.h +++ b/ssl/kssl_lcl.h @@ -59,10 +59,10 @@ #ifndef KSSL_LCL_H #define KSSL_LCL_H -#ifndef OPENSSL_NO_KRB5 - #include +#ifndef OPENSSL_NO_KRB5 + #ifdef __cplusplus extern "C" { #endif diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 36068780e7..67dc5b05d5 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -62,9 +62,7 @@ #include #include #include "ssl_locl.h" -#ifndef OPENSSL_NO_KRB5 #include "kssl_lcl.h" -#endif #include static SSL_METHOD *ssl3_get_client_method(int ver); diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 304f217b04..8b55f835ed 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -121,9 +121,7 @@ #include #include #include "ssl_locl.h" -#ifndef OPENSSL_NO_KRB5 #include "kssl_lcl.h" -#endif /* OPENSSL_NO_KRB5 */ #include static SSL_METHOD *ssl3_get_server_method(int ver); diff --git a/ssl/ssl.h b/ssl/ssl.h index bae5f70f57..c1c467480d 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -70,9 +70,7 @@ #ifndef OPENSSL_NO_X509 #include #endif -#ifndef OPENSSL_NO_KRB5 #include -#endif #include #include -- 2.25.1