Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
Signed-off-by: adiforluls <[email protected]>
  • Loading branch information
adiforluls committed Sep 22, 2023
1 parent 4ef1775 commit a215630
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions plugins/out_oracle_log_analytics/oci_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,13 @@ flb_sds_t refresh_cert(struct flb_upstream *u,
flb_sds_t get_tenancy_id_from_certificate(X509 *cert)
{
flb_sds_t t_id = NULL;
int i;
const unsigned char *str;
char* x;

X509_NAME *subj = X509_get_subject_name(cert);

for (int i = 0; i < X509_NAME_entry_count(subj); i++) {
for (i = 0; i < X509_NAME_entry_count(subj); i++) {
X509_NAME_ENTRY *e = X509_NAME_get_entry(subj, i);
ASN1_STRING *d = X509_NAME_ENTRY_get_data(e);
str = ASN1_STRING_get0_data(d);
Expand Down Expand Up @@ -329,7 +330,8 @@ char* sanitize_certificate_string(flb_sds_t cert_pem)
void colon_separated_fingerprint(unsigned char* readbuf, void *writebuf, size_t len)
{
char *l;
for(size_t i=0; i < len-1; i++) {
size_t i;
for(i=0; i < len-1; i++) {
l = (char*) (3*i + ((intptr_t) writebuf));
sprintf(l, "%02x:", readbuf[i]);
}
Expand Down Expand Up @@ -648,7 +650,6 @@ const char* get_token_exp(flb_sds_t token_string,
char *val;
int key_len;
int val_len;
flb_sds_t token = NULL;

jsmn_init(&parser);

Expand Down
4 changes: 2 additions & 2 deletions plugins/out_oracle_log_analytics/oci_logan_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ static int build_federation_client_headers(struct flb_oci_logan *ctx,
flb_sds_t signature = NULL;
flb_sds_t auth_header_str = NULL;

flb_sds_t tmp_ref = NULL;

size_t tmp_len = 0;

unsigned char sha256_buf[32] = { 0 };
Expand Down Expand Up @@ -937,6 +935,8 @@ struct flb_oci_logan *flb_oci_logan_conf_create(struct flb_output_instance *ins,
return NULL;
}

build_region_table(ctx);

if (strcasecmp(ctx->auth_type, INSTANCE_PRINCIPAL) == 0) {
ctx->cert_u = flb_upstream_create(config, METADATA_HOST_BASE, 80, FLB_IO_TCP, NULL);
}
Expand Down

0 comments on commit a215630

Please sign in to comment.