aboutsummaryrefslogtreecommitdiff
path: root/src/common/kmgr_utils.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-12-25 11:35:59 -0500
committerBruce Momjian <bruce@momjian.us>2020-12-25 11:35:59 -0500
commite35b2bad1a10a8eef9c1ffb563847b9c9df0cfce (patch)
tree365d8c0b38b849b2258f2c2565cdf54629b98775 /src/common/kmgr_utils.c
parent945083b2f7e6c19c8921c655cac6778acb1e3e03 (diff)
downloadpostgresql-e35b2bad1a10a8eef9c1ffb563847b9c9df0cfce.tar.gz
postgresql-e35b2bad1a10a8eef9c1ffb563847b9c9df0cfce.zip
remove uint128 requirement from patch 978f869b99 (CFE)
Used char[16] instead. Reported-by: buildfarm member florican Backpatch-through: master
Diffstat (limited to 'src/common/kmgr_utils.c')
-rw-r--r--src/common/kmgr_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/kmgr_utils.c b/src/common/kmgr_utils.c
index d031976f500..db8572c8eae 100644
--- a/src/common/kmgr_utils.c
+++ b/src/common/kmgr_utils.c
@@ -81,7 +81,7 @@ kmgr_wrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
&enclen, /* Resulting length, must match input for us */
iv, /* Generated IV from above */
sizeof(iv), /* Length of the IV */
- (unsigned char *) &out->tag, /* Resulting tag */
+ out->tag, /* Resulting tag */
sizeof(out->tag))) /* Length of our tag */
return false;
@@ -106,7 +106,7 @@ kmgr_unwrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
out->pgkey_id = in->pgkey_id;
out->counter = in->counter;
- out->tag = in->tag;
+ memcpy(out->tag, in->tag, sizeof(in->tag));
/* Construct the IV we are going to use, see kmgr_utils.h */
memcpy(iv, &out->pgkey_id, sizeof(out->pgkey_id));
@@ -120,7 +120,7 @@ kmgr_unwrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
&declen, /* Length of plaintext */
iv, /* IV we constructed above */
sizeof(iv), /* Size of our IV */
- (unsigned char *) &in->tag, /* Tag which will be verified */
+ in->tag, /* Tag which will be verified */
sizeof(in->tag))) /* Size of our tag */
return false;