Skip to content

Commit

Permalink
plugins: moved the mode argument to the first position in flb_tls_create
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich authored and edsiper committed Aug 31, 2022
1 parent 68eeec4 commit 613b7dc
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions plugins/filter_kubernetes/kube_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,9 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config
if (!ctx->tls_ca_path && !ctx->tls_ca_file) {
ctx->tls_ca_file = flb_strdup(FLB_KUBE_CA);
}
ctx->tls = flb_tls_create(ctx->tls_verify,
ctx->tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
ctx->tls_verify,
ctx->tls_debug,
FLB_TLS_CLIENT_MODE,
ctx->tls_vhost,
ctx->tls_ca_path,
ctx->tls_ca_file,
Expand Down
4 changes: 2 additions & 2 deletions plugins/filter_nightfall/nightfall.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ static int cb_nightfall_init(struct flb_filter_instance *f_ins,
"Bearer %s",
ctx->nightfall_api_key);

ctx->tls = flb_tls_create(ctx->tls_verify,
ctx->tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
ctx->tls_verify,
ctx->tls_debug,
FLB_TLS_CLIENT_MODE,
ctx->tls_vhost,
ctx->tls_ca_path,
NULL,
Expand Down
4 changes: 2 additions & 2 deletions plugins/in_tcp/tcp_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ struct flb_in_tcp_config *tcp_config_init(struct flb_input_instance *ins)
}

if (ins->use_tls) {
ins->tls = flb_tls_create(ins->tls_verify,
ins->tls = flb_tls_create(FLB_TLS_SERVER_MODE,
ins->tls_verify,
ins->tls_debug,
FLB_TLS_SERVER_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
16 changes: 8 additions & 8 deletions plugins/out_bigquery/bigquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,9 +684,9 @@ static int cb_bigquery_init(struct flb_output_instance *ins,

if (ctx->has_identity_federation) {
/* Configure AWS IMDS */
ctx->aws_tls = flb_tls_create(FLB_TRUE,
ctx->aws_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -722,9 +722,9 @@ static int cb_bigquery_init(struct flb_output_instance *ins,
ctx->aws_provider->provider_vtable->upstream_set(ctx->aws_provider, ctx->ins);

/* Configure AWS STS */
ctx->aws_sts_tls = flb_tls_create(FLB_TRUE,
ctx->aws_sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -753,9 +753,9 @@ static int cb_bigquery_init(struct flb_output_instance *ins,
ctx->aws_sts_upstream->net.keepalive = FLB_FALSE;

/* Configure Google STS */
ctx->google_sts_tls = flb_tls_create(FLB_TRUE,
ctx->google_sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand All @@ -781,9 +781,9 @@ static int cb_bigquery_init(struct flb_output_instance *ins,
}

/* Configure Google IAM */
ctx->google_iam_tls = flb_tls_create(FLB_TRUE,
ctx->google_iam_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
12 changes: 6 additions & 6 deletions plugins/out_cloudwatch_logs/cloudwatch_logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
}

/* one tls instance for provider, one for cw client */
ctx->cred_tls = flb_tls_create(FLB_TRUE,
ctx->cred_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand All @@ -238,9 +238,9 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
goto error;
}

ctx->client_tls = flb_tls_create(FLB_TRUE,
ctx->client_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -273,9 +273,9 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
}

/* STS provider needs yet another separate TLS instance */
ctx->sts_tls = flb_tls_create(FLB_TRUE,
ctx->sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
8 changes: 4 additions & 4 deletions plugins/out_es/es_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ struct flb_elasticsearch *flb_es_conf_create(struct flb_output_instance *ins,
flb_debug("[out_es] Enabled AWS Auth");

/* AWS provider needs a separate TLS instance */
ctx->aws_tls = flb_tls_create(FLB_TRUE,
ctx->aws_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -372,9 +372,9 @@ struct flb_elasticsearch *flb_es_conf_create(struct flb_output_instance *ins,
}

/* STS provider needs yet another separate TLS instance */
ctx->aws_sts_tls = flb_tls_create(FLB_TRUE,
ctx->aws_sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
12 changes: 6 additions & 6 deletions plugins/out_kinesis_firehose/firehose.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ static int cb_firehose_init(struct flb_output_instance *ins,
}

/* one tls instance for provider, one for cw client */
ctx->cred_tls = flb_tls_create(FLB_TRUE,
ctx->cred_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand All @@ -164,9 +164,9 @@ static int cb_firehose_init(struct flb_output_instance *ins,
goto error;
}

ctx->client_tls = flb_tls_create(FLB_TRUE,
ctx->client_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -199,9 +199,9 @@ static int cb_firehose_init(struct flb_output_instance *ins,
}

/* STS provider needs yet another separate TLS instance */
ctx->sts_tls = flb_tls_create(FLB_TRUE,
ctx->sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
26 changes: 13 additions & 13 deletions plugins/out_kinesis_streams/kinesis.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
}

/* one tls instance for provider, one for cw client */
ctx->cred_tls = flb_tls_create(FLB_TRUE,
ctx->cred_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand All @@ -153,9 +153,9 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
goto error;
}

ctx->client_tls = flb_tls_create(FLB_TRUE,
ctx->client_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -195,15 +195,15 @@ static int cb_kinesis_init(struct flb_output_instance *ins,
}

/* STS provider needs yet another separate TLS instance */
ctx->sts_tls = flb_tls_create(FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
ins->tls_crt_file,
ins->tls_key_file,
ins->tls_key_passwd);
ctx->sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
ins->tls_crt_file,
ins->tls_key_file,
ins->tls_key_passwd);
if (!ctx->sts_tls) {
flb_errno();
goto error;
Expand Down
8 changes: 4 additions & 4 deletions plugins/out_opensearch/os_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ struct flb_opensearch *flb_os_conf_create(struct flb_output_instance *ins,
flb_debug("[out_es] Enabled AWS Auth");

/* AWS provider needs a separate TLS instance */
ctx->aws_tls = flb_tls_create(FLB_TRUE,
ctx->aws_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -269,9 +269,9 @@ struct flb_opensearch *flb_os_conf_create(struct flb_output_instance *ins,
}

/* STS provider needs yet another separate TLS instance */
ctx->aws_sts_tls = flb_tls_create(FLB_TRUE,
ctx->aws_sts_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down
12 changes: 6 additions & 6 deletions plugins/out_s3/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,9 @@ static int cb_s3_init(struct flb_output_instance *ins,
}

if (ctx->insecure == FLB_FALSE) {
ctx->client_tls = flb_tls_create(ins->tls_verify,
ctx->client_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
ins->tls_verify,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand All @@ -786,9 +786,9 @@ static int cb_s3_init(struct flb_output_instance *ins,
}

/* AWS provider needs a separate TLS instance */
ctx->provider_tls = flb_tls_create(FLB_TRUE,
ctx->provider_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down Expand Up @@ -819,9 +819,9 @@ static int cb_s3_init(struct flb_output_instance *ins,
role_arn = (char *) tmp;

/* STS provider needs yet another separate TLS instance */
ctx->sts_provider_tls = flb_tls_create(FLB_TRUE,
ctx->sts_provider_tls = flb_tls_create(FLB_TLS_CLIENT_MODE,
FLB_TRUE,
ins->tls_debug,
FLB_TLS_CLIENT_MODE,
ins->tls_vhost,
ins->tls_ca_path,
ins->tls_ca_file,
Expand Down

0 comments on commit 613b7dc

Please sign in to comment.