mirror arg requirements from wc_HpkeContextSealBase

This commit is contained in:
sebastian-carpenter
2026-03-27 13:22:28 -06:00
parent 690b086edf
commit cae12b7ffb
+2 -1
View File
@@ -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;
}