Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite35b2ba

Browse files
committed
remove uint128 requirement from patch978f869 (CFE)
Used char[16] instead.Reported-by: buildfarm member floricanBackpatch-through: master
1 parent945083b commite35b2ba

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/common/kmgr_utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ kmgr_wrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
8181
&enclen,/* Resulting length, must match input for us */
8282
iv,/* Generated IV from above */
8383
sizeof(iv),/* Length of the IV */
84-
(unsignedchar*)&out->tag,/* Resulting tag */
84+
out->tag,/* Resulting tag */
8585
sizeof(out->tag)))/* Length of our tag */
8686
return false;
8787

@@ -106,7 +106,7 @@ kmgr_unwrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
106106

107107
out->pgkey_id=in->pgkey_id;
108108
out->counter=in->counter;
109-
out->tag=in->tag;
109+
memcpy(out->tag,in->tag,sizeof(in->tag));
110110

111111
/* Construct the IV we are going to use, see kmgr_utils.h */
112112
memcpy(iv,&out->pgkey_id,sizeof(out->pgkey_id));
@@ -120,7 +120,7 @@ kmgr_unwrap_key(PgCipherCtx *ctx, CryptoKey *in, CryptoKey *out)
120120
&declen,/* Length of plaintext */
121121
iv,/* IV we constructed above */
122122
sizeof(iv),/* Size of our IV */
123-
(unsignedchar*)&in->tag,/* Tag which will be verified */
123+
in->tag,/* Tag which will be verified */
124124
sizeof(in->tag)))/* Size of our tag */
125125
return false;
126126

‎src/include/common/kmgr_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ typedef struct CryptoKey
8282
{
8383
uint64pgkey_id;/* Upper half of IV */
8484
uint64counter;/* Lower half of IV */
85-
uint128tag;/* GCM tag */
85+
unsignedchartag[16];/* GCM tag */
8686
unsignedcharencrypted_key[sizeof(int)+KMGR_MAX_KEY_LEN_BYTES];
8787
}CryptoKey;
8888

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp