tcptls.h: Repair ./configure --with-ssl=PATH.

asterisk/tcptls.h was included (explicitly, implicitly, or transitively). Those
inclusions got replaced by forward declarations. As side effect, the inclusions
got completed.

ASTERISK-27878

Change-Id: I9d102728e30336d6522e5e4ae9e964013a0835f7
This commit is contained in:
Alexander Traud
2018-05-28 17:29:23 +02:00
parent 4ea98e49f1
commit 24503fb600
5 changed files with 71 additions and 42 deletions

View File

@@ -25,21 +25,19 @@
* \brief Generic abstraction for input/output streams.
*/
#include "asterisk.h" /* for size_t, ssize_t, HAVE_OPENSSL */
#if defined(HAVE_OPENSSL)
#define DO_SSL /* comment in/out if you want to support ssl */
#endif
#ifdef DO_SSL
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
#else
/* declare dummy types so we can define a pointer to them */
typedef struct {} SSL;
typedef struct {} SSL_CTX;
#endif /* DO_SSL */
struct ssl_st; /* forward declaration */
struct ssl_ctx_st; /* forward declaration */
struct timeval; /* forward declaration */
typedef struct ssl_st SSL;
typedef struct ssl_ctx_st SSL_CTX;
struct ast_iostream;
struct ast_iostream; /* forward declaration */
/*!
* \brief Disable the iostream timeout timer.

View File

@@ -46,18 +46,20 @@
* be run earlier in the startup process so modules have it available.
*
* \ref AstTlsOverview
*
* \todo For SIP, the SubjectAltNames should be checked on verification
* of the certificate. (Check RFC 5922)
*
*/
#ifndef _ASTERISK_TCPTLS_H
#define _ASTERISK_TCPTLS_H
#include "asterisk/netsock2.h"
#include "asterisk/utils.h"
#include <pthread.h> /* for pthread_t */
#include <sys/param.h> /* for MAXHOSTNAMELEN */
#include "asterisk/iostream.h"
#include "asterisk/netsock2.h" /* for ast_sockaddr */
#include "asterisk/utils.h" /* for ast_flags */
struct ssl_ctx_st; /* forward declaration */
typedef struct ssl_ctx_st SSL_CTX;
/*! SSL support */
#define AST_CERTFILE "asterisk.pem"