#85 修复ssl、http业务层中的编译警告。

This commit is contained in:
zhengchao
2018-11-20 19:34:27 +08:00
parent 866883a1f7
commit 6c9ff10aa7
8 changed files with 29 additions and 59 deletions

View File

@@ -521,7 +521,7 @@ struct key_keeper* key_keeper_init(const char * profile, const char* section, vo
keeper->htable = create_hash_table(keeper->hash_slot_size, keeper->hash_expire_seconds);
if(0==strcmp(keeper->untrusted_ca_path, keeper->trusted_ca_path))
{
TFE_LOG_ERROR(logger, "Warnning: Trusted and Untrusted Root CA share the same path % .", keeper->trusted_ca_path);
TFE_LOG_ERROR(logger, "Warnning: Trusted and Untrusted Root CA share the same path %s .", keeper->trusted_ca_path);
}
if(keeper->work_mode==KK_MODE_DEBUG)
{

View File

@@ -1126,7 +1126,7 @@ static int ossl_session_ticket_key_callback(SSL *ssl_conn,
if(0!=memcmp(name, key[0].name, 16))
{
TFE_LOG_INFO(mgr->logger, "ssl session ticket decrypt, key: \"%*s\" not found"
,tfe_hexdump(buf, name ,16)-buf, buf);
,(int)(tfe_hexdump(buf, name ,16)-buf), buf);
ATOMIC_INC(&(mgr->stat_val[SSL_DOWN_TICKET_NOTFOUND]));
return 0;
}
@@ -1430,7 +1430,6 @@ static void ssl_client_connected_eventcb(struct bufferevent * bev, short events,
struct ssl_stream * s_stream = ctx->downstream;
struct ssl_mgr* mgr=s_stream->mgr;
SSL_SESSION * ssl_sess = NULL;
const char* sni=ctx->origin_ssl->client_hello->sni?ctx->origin_ssl->client_hello->sni:"null";
char error_str[TFE_STRING_MAX]={0};
if (events & BEV_EVENT_ERROR)
@@ -1511,7 +1510,6 @@ void ssl_async_downstream_create(struct future * f, struct ssl_mgr * mgr, struct
{
assert(upstream->dir == CONN_DIR_UPSTREAM);
int * previous_verfiy_result=NULL;
const char* sni=NULL;
struct ssl_connect_client_ctx * ctx = ALLOC(struct ssl_connect_client_ctx, 1);
ctx->keyring_id = keyring_id;
@@ -1581,7 +1579,6 @@ static void pxy_ssl_shutdown_cb(evutil_socket_t fd, short what, void * arg)
struct ssl_mgr* mgr=ctx->s_stream->mgr;
short want = 0;
int rv = 0, sslerr = 0;
char tmp[1024];
if (ctx->ev)
{
event_free(ctx->ev);

View File

@@ -38,7 +38,6 @@ struct ssl_trusted_cert_storage
BIO *bio=NULL;
X509* x=NULL;
X509_CRL* x_crl=NULL;
int error;
bio=BIO_new_file(filename, "r");
if(bio==NULL)
@@ -79,7 +78,7 @@ struct ssl_trusted_cert_storage
return 1;
}
static int filter_pem_fn(const struct dirent * ent)
UNUSED static int filter_pem_fn(const struct dirent * ent)
{
const char* fn_suffix=".pem";
if(strlen(ent->d_name)< strlen(fn_suffix))
@@ -152,7 +151,7 @@ static X509_STORE* _X509_store_create(const char* pem_bundle, const char* pem_di
static MESA_htable_handle _create_mesa_htable(void)
{
int ret=0;
UNUSED int ret=0;
MESA_htable_handle htable = MESA_htable_born();
ret = __wrapper_MESA_htable_set_opt_int(htable, MHO_SCREEN_PRINT_CTRL, 0);
ret = __wrapper_MESA_htable_set_opt_int(htable, MHO_THREAD_SAFE, 0);
@@ -172,7 +171,6 @@ static MESA_htable_handle _create_mesa_htable(void)
struct ssl_trusted_cert_storage* ssl_trusted_cert_storage_create(const char* pem_bundle,
const char* pem_dir, struct cert_store_param* param)
{
int ret=0;
struct ssl_trusted_cert_storage* storage=ALLOC(struct ssl_trusted_cert_storage, 1);
storage->param=*param;
storage->effective_store=_X509_store_create(pem_bundle, pem_dir, &(storage->param));