wrap optional headers with OPENSSL_NO_ macro

This commit is contained in:
Zhi Guan
2017-12-26 22:51:47 +08:00
parent 58751e510e
commit a9b31e17a5
37 changed files with 202 additions and 67 deletions

View File

@@ -7,6 +7,8 @@
* https://www.openssl.org/source/license.html
*/
#include <openssl/comp.h>
#ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
#endif
void comp_zlib_cleanup_int(void);

View File

@@ -41,9 +41,9 @@ extern "C" {
*/
# define OPENSSL_VERSION_NUMBER 0x1010004fL
# ifdef OPENSSL_FIPS
# define OPENSSL_VERSION_TEXT "GmSSL 2.0 - OpenSSL 1.1.0d-fips 08 Dec 2017"
# define OPENSSL_VERSION_TEXT "GmSSL 2.0.0 - OpenSSL 1.1.0d-fips 08 Dec 2017"
# else
# define OPENSSL_VERSION_TEXT "GmSSL 2.0 - OpenSSL 1.1.0d 08 Dec 2017"
# define OPENSSL_VERSION_TEXT "GmSSL 2.0.0 - OpenSSL 1.1.0d 08 Dec 2017"
# endif
/*-

View File

@@ -50,11 +50,21 @@
#ifndef HEADER_PEM3_H
#define HEADER_PEM3_H
#include <openssl/cpk.h>
#include <openssl/sm9.h>
#include <openssl/bfibe.h>
#include <openssl/bb1ibe.h>
#include <openssl/paillier.h>
#ifndef OPENSSL_NO_CPK
# include <openssl/cpk.h>
#endif
#ifndef OPENSSL_NO_SM9
# include <openssl/sm9.h>
#endif
#ifndef OPENSSL_NO_BFIBE
# include <openssl/bfibe.h>
#endif
#ifndef OPENSSL_NO_BB1IBE
# include <openssl/bb1ibe.h>
#endif
#ifndef OPENSSL_NO_PAILLIER
# include <openssl/paillier.h>
#endif
#ifdef __cplusplus

View File

@@ -92,7 +92,9 @@
# include <openssl/e_os2.h>
# include <openssl/opensslconf.h>
# include <openssl/comp.h>
# ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
# endif
# include <openssl/bio.h>
# if OPENSSL_API_COMPAT < 0x10100000L
# include <openssl/x509.h>
@@ -102,11 +104,15 @@
# endif
# include <openssl/pem.h>
# include <openssl/hmac.h>
# include <openssl/async.h>
# ifndef OPENSSL_NO_ASYNC
# include <openssl/async.h>
# endif
# include <openssl/safestack.h>
# include <openssl/symhacks.h>
# include <openssl/ct.h>
# ifndef OPENSSL_NO_CT
# include <openssl/ct.h>
# endif
#ifdef __cplusplus
extern "C" {
@@ -1707,7 +1713,7 @@ __owur const SSL_METHOD *DTLS_method(void); /* DTLS 1.0 and 1.2 */
__owur const SSL_METHOD *DTLS_server_method(void); /* DTLS 1.0 and 1.2 */
__owur const SSL_METHOD *DTLS_client_method(void); /* DTLS 1.0 and 1.2 */
#ifndef OPENSSL_NO_GMTLS_METHOD
#ifndef OPENSSL_NO_GMTLS
__owur const SSL_METHOD *GMTLS_method(void); /* GMTLSv1.1 */
__owur const SSL_METHOD *GMTLS_server_method(void); /* GMTLSv1.1 */
__owur const SSL_METHOD *GMTLS_client_method(void); /* GMTLSv1.1 */

View File

@@ -16,7 +16,9 @@
#ifndef HEADER_SSL3_H
# define HEADER_SSL3_H
# include <openssl/comp.h>
# ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
# endif
# include <openssl/buffer.h>
# include <openssl/evp.h>
# include <openssl/ssl.h>