Skip to content

Commit

Permalink
out_bigquery: renamed flb_digest to flb_hash
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Aug 12, 2022
1 parent f9286c3 commit ebdcecf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/out_bigquery/bigquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_oauth2.h>
#include <fluent-bit/flb_base64.h>
#include <fluent-bit/flb_digest.h>
#include <fluent-bit/flb_hash.h>
#include <fluent-bit/flb_crypto.h>
#include <fluent-bit/flb_signv4.h>
#include <fluent-bit/flb_kv.h>
Expand Down Expand Up @@ -131,9 +131,9 @@ static int bigquery_jwt_encode(struct flb_bigquery *ctx,
out = flb_sds_cat(out, buf, olen);

/* do sha256() of base64(header).base64(payload) */
ret = flb_digest_simple(FLB_DIGEST_SHA256,
(unsigned char *) out, flb_sds_len(out),
sha256_buf, sizeof(sha256_buf));
ret = flb_hash_simple(FLB_HASH_SHA256,
(unsigned char *) out, flb_sds_len(out),
sha256_buf, sizeof(sha256_buf));

if (ret != FLB_CRYPTO_SUCCESS) {
flb_plg_error(ctx->ins, "error hashing token");
Expand All @@ -147,7 +147,7 @@ static int bigquery_jwt_encode(struct flb_bigquery *ctx,

ret = flb_crypto_sign_simple(FLB_CRYPTO_PRIVATE_KEY,
FLB_CRYPTO_PADDING_PKCS1,
FLB_DIGEST_SHA256,
FLB_HASH_SHA256,
(unsigned char *) secret, len,
sha256_buf, sizeof(sha256_buf),
sig, &sig_len);
Expand Down

0 comments on commit ebdcecf

Please sign in to comment.