Merge pull request #426 from themiron/typedef-redef-fixes

Fix build error with gnu99 compilers
This commit is contained in:
wtoorop 2019-04-12 15:25:44 +02:00 committed by GitHub
commit c89b9d0796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 12 deletions

View File

@ -53,7 +53,8 @@
#define HAVE_TLS_CTX_CURVES_LIST 0
#define HAVE_TLS_CONN_CURVES_LIST 0
typedef struct getdns_log_config getdns_log_config;
/* Forward declare type. */
struct getdns_log_config;
typedef struct _getdns_tls_context {
struct mem_funcs* mfs;
@ -64,7 +65,7 @@ typedef struct _getdns_tls_context {
gnutls_protocol_t max_tls;
char* ca_trust_file;
char* ca_trust_path;
const getdns_log_config* log;
const struct getdns_log_config* log;
} _getdns_tls_context;
typedef struct _getdns_tls_connection {
@ -81,7 +82,7 @@ typedef struct _getdns_tls_connection {
dane_query_t dane_query;
dane_state_t dane_state;
char* tlsa;
const getdns_log_config* log;
const struct getdns_log_config* log;
} _getdns_tls_connection;
typedef struct _getdns_tls_session {

View File

@ -54,20 +54,21 @@
#define GETDNS_TLS_MAX_DIGEST_LENGTH (EVP_MAX_MD_SIZE)
typedef struct sha256_pin sha256_pin_t;
typedef struct getdns_log_config getdns_log_config;
/* Forward declare type. */
struct sha256_pin;
struct getdns_log_config;
typedef struct _getdns_tls_context {
SSL_CTX* ssl;
const getdns_log_config* log;
const struct getdns_log_config* log;
} _getdns_tls_context;
typedef struct _getdns_tls_connection {
SSL* ssl;
const getdns_log_config* log;
const struct getdns_log_config* log;
#if defined(USE_DANESSL)
const char* auth_name;
const sha256_pin_t* pinset;
const struct sha256_pin* pinset;
#endif
} _getdns_tls_connection;

View File

@ -42,7 +42,7 @@
/* Forward declare type. */
struct sha256_pin;
typedef struct sha256_pin sha256_pin_t;
struct getdns_log_config;
/* Additional return codes required by TLS abstraction. Internal use only. */
#define GETDNS_RETURN_TLS_WANT_READ ((getdns_return_t) 420)
@ -61,7 +61,7 @@ void _getdns_tls_init();
* @paam log pointer to context log config.
* @return pointer to new context or NULL on error.
*/
_getdns_tls_context* _getdns_tls_context_new(struct mem_funcs* mfs, const getdns_log_config* log);
_getdns_tls_context* _getdns_tls_context_new(struct mem_funcs* mfs, const struct getdns_log_config* log);
/**
* Free a TLS context.
@ -166,7 +166,7 @@ getdns_return_t _getdns_tls_context_set_ca(_getdns_tls_context* ctx, const char*
* @paam log pointer to connection log config.
* @return pointer to new connection or NULL on error.
*/
_getdns_tls_connection* _getdns_tls_connection_new(struct mem_funcs* mfs, _getdns_tls_context* ctx, int fd, const getdns_log_config* log);
_getdns_tls_connection* _getdns_tls_connection_new(struct mem_funcs* mfs, _getdns_tls_context* ctx, int fd, const struct getdns_log_config* log);
/**
* Free a TLS connection.
@ -314,7 +314,7 @@ getdns_return_t _getdns_tls_connection_setup_hostname_auth(_getdns_tls_connectio
* @return GETDNS_RETURN_GOOD if all OK.
* @return GETDNS_RETURN_INVALID_PARAMETER if conn is null or has no SSL.
*/
getdns_return_t _getdns_tls_connection_set_host_pinset(_getdns_tls_connection* conn, const char* auth_name, const sha256_pin_t* pinset);
getdns_return_t _getdns_tls_connection_set_host_pinset(_getdns_tls_connection* conn, const char* auth_name, const struct sha256_pin* pinset);
/**
* Get result of certificate verification.