Merge pull request #10094 from sebastian-carpenter/GH-10068

Fixes: for GH #10068
This commit is contained in:
JacobBarthelmeh
2026-04-22 14:24:25 -06:00
committed by GitHub
6 changed files with 713 additions and 112 deletions
+5 -4
View File
@@ -917,7 +917,7 @@ int wc_HpkeInitSealContext(Hpke* hpke, HpkeBaseContext* context,
void* ephemeralKey, void* receiverKey, byte* info, word32 infoSz)
{
if (hpke == NULL || context == NULL || ephemeralKey == NULL ||
receiverKey == NULL || (info == NULL && infoSz > 0)) {
receiverKey == NULL || (info == NULL && infoSz != 0)) {
return BAD_FUNC_ARG;
}
@@ -935,7 +935,7 @@ int wc_HpkeContextSealBase(Hpke* hpke, HpkeBaseContext* context,
int ret;
byte nonce[HPKE_Nn_MAX];
WC_DECLARE_VAR(aes, Aes, 1, 0);
if (hpke == NULL || context == NULL || (aad == NULL && aadSz > 0) ||
if (hpke == NULL || context == NULL || (aad == NULL && aadSz != 0) ||
plaintext == NULL || out == NULL) {
return BAD_FUNC_ARG;
}
@@ -1160,7 +1160,7 @@ int wc_HpkeInitOpenContext(Hpke* hpke, HpkeBaseContext* context,
word32 infoSz)
{
if (hpke == NULL || context == NULL || receiverKey == NULL || pubKey == NULL
|| (info == NULL && infoSz > 0)) {
|| (info == NULL && infoSz != 0)) {
return BAD_FUNC_ARG;
}
@@ -1175,7 +1175,8 @@ int wc_HpkeContextOpenBase(Hpke* hpke, HpkeBaseContext* context, byte* aad,
int ret;
byte nonce[HPKE_Nn_MAX];
WC_DECLARE_VAR(aes, Aes, 1, 0);
if (hpke == NULL || context == NULL || ciphertext == NULL || out == NULL) {
if (hpke == NULL || context == NULL || (aad == NULL && aadSz != 0) ||
ciphertext == NULL || out == NULL) {
return BAD_FUNC_ARG;
}