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

@@ -73,7 +73,9 @@
#include <openssl/bio.h>
#include <openssl/pem.h>
#include <openssl/x509v3.h>
#include <openssl/dh.h>
#ifndef OPENSSL_NO_DH
# include <openssl/dh.h>
#endif
#include <openssl/bn.h>
#include <openssl/crypto.h>
#include "ssl_locl.h"

View File

@@ -42,8 +42,12 @@
#include <stdio.h>
#include <ctype.h>
#include <openssl/objects.h>
#include <openssl/comp.h>
#include <openssl/engine.h>
#ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
#endif
#ifndef OPENSSL_NO_ENGINE
# include <openssl/engine.h>
#endif
#include <openssl/crypto.h>
#include "ssl_locl.h"
#include "internal/thread_once.h"

View File

@@ -94,10 +94,18 @@
#include <openssl/lhash.h>
#include <openssl/x509v3.h>
#include <openssl/rand.h>
#include <openssl/ocsp.h>
#include <openssl/engine.h>
#include <openssl/async.h>
#ifndef OPENSSL_NO_OCSP
# include <openssl/ocsp.h>
#endif
#ifndef OPENSSL_NO_ENGINE
# include <openssl/engine.h>
#endif
#ifndef OPENSSL_NO_ASYNC
# include <openssl/async.h>
#endif
#ifndef OPENSSL_NO_CT
#include <openssl/ct.h>
#endif
const char SSL_version_str[] = OPENSSL_VERSION_TEXT;
@@ -706,7 +714,9 @@ SSL *SSL_new(SSL_CTX *ctx)
s->psk_server_callback = ctx->psk_server_callback;
#endif
#ifndef OPENSSL_NO_ASYNC
s->job = NULL;
#endif
#ifndef OPENSSL_NO_CT
if (!SSL_set_ct_validation_callback(s, ctx->ct_validation_callback,

View File

@@ -100,7 +100,9 @@
# endif
# include <openssl/buffer.h>
# include <openssl/comp.h>
# ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
# endif
# include <openssl/bio.h>
# include <openssl/stack.h>
# ifndef OPENSSL_NO_RSA
@@ -114,9 +116,14 @@
# endif
# include <openssl/err.h>
# include <openssl/ssl.h>
# include <openssl/async.h>
# include <openssl/gmtls.h>
# ifndef OPENSSL_NO_ASYNC
# include <openssl/async.h>
# endif
# include <openssl/symhacks.h>
# include <openssl/ct.h>
# ifndef OPENSSL_NO_CT
# include <openssl/ct.h>
# endif
# include "record/record.h"
# include "statem/statem.h"
# include "packet_locl.h"
@@ -557,12 +564,14 @@ struct ssl_method_st {
long (*ssl_ctx_callback_ctrl) (SSL_CTX *s, int cb_id, void (*fp) (void));
};
#ifndef OPENSSL_NO_SM9
typedef struct cert_sm9_st {
SM9PublicParameters *params;
SM9PrivateKey *privatekey;
SM9PublicKey *publickey;
char *id;
} CERT_SM9;
#endif
/*-
* Lets make this into an ASN.1 type structure as follows
@@ -1234,8 +1243,10 @@ struct ssl_st {
/* Default password callback user data. */
void *default_passwd_callback_userdata;
/* Async Job info */
# ifndef OPENSSL_NO_ASYNC
ASYNC_JOB *job;
ASYNC_WAIT_CTX *waitctx;
# endif
CRYPTO_RWLOCK *lock;
};

View File

@@ -85,7 +85,9 @@
#include <stdio.h>
#include <openssl/lhash.h>
#include <openssl/rand.h>
#include <openssl/engine.h>
#ifndef OPENSSL_NO_ENGINE
# include <openssl/engine.h>
#endif
#include "ssl_locl.h"
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);

View File

@@ -84,7 +84,9 @@
#include <stdio.h>
#include "ssl_locl.h"
#include <openssl/comp.h>
#ifndef OPENSSL_NO_COMP
# include <openssl/comp.h>
#endif
#include <openssl/evp.h>
#include <openssl/kdf.h>
#include <openssl/rand.h>

View File

@@ -9,7 +9,12 @@
/* Custom extension utility functions */
#include <openssl/ct.h>
#include <stdio.h>
#include <openssl/opensslconf.h>
#ifndef OPENSSL_NO_CT
# include <openssl/ct.h>
#endif
#include "ssl_locl.h"
/* Find a custom extension from the list. */

View File

@@ -57,16 +57,20 @@
#include <stdio.h>
#include <stdlib.h>
#include <openssl/opensslconf.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/ocsp.h>
#ifndef OPENSSL_NO_OCSP
# include <openssl/ocsp.h>
#endif
#include <openssl/conf.h>
#include <openssl/x509v3.h>
#include <openssl/bn.h>
#include "ssl_locl.h"
#include <openssl/ct.h>
#ifndef OPENSSL_NO_CT
# include <openssl/ct.h>
#endif
#define CHECKLEN(curr, val, limit) \
(((curr) >= (limit)) || (size_t)((limit) - (curr)) < (size_t)(val))