crypto: allow NULL 'ad' to aes_siv_decrypt
James Prestwood
PATCH 1/2 crypto: allow NULL 'ad' to aes_siv_decrypt
--- src/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/crypto.c +3 -1
@@ -389,7 +389,9 @@ bool aes_siv_decrypt(const void *key, size_t key_len, const void *in,if (in_len <16 )return false; -memcpy (iov, ad,sizeof (struct iovec ) * num_ad); +if (ad) +memcpy (iov, ad,sizeof (struct iovec ) * num_ad); + iov[num_ad].iov_base = (void *)out; iov[num_ad].iov_len = in_len -16 ; num_ad++;
Signature · 1 line
2.31.1
James Prestwood
PATCH 2/2 offchannel: always use -ECANCELED for cancelation
info->error gets reset to zero on a successful ROC callback which was getting used for cancelation.
--- src/offchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/offchannel.c +1 -1
@@ -231,7 +231,7 @@ void offchannel_cancel(uint64_t wdev_id, uint32_t id) destroy:if (info->destroy) - info->destroy (info->error, info->user_data); + info->destroy (-ECANCELED , info->user_data); info->destroy =NULL ; info->started =NULL ;
Signature · 1 line
2.31.1
Denis Kenzior
AppliedRe: [PATCH 2/2] offchannel: always use -ECANCELED for cancelation
Hi James,
Quoted 6 lines · James Prestwood
info->errorgets reset to zero on a successful ROC callback which was getting used for cancelation.--- src/offchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Regards,
-Denis
Denis Kenzior
AppliedQuoted 4 lines · James Prestwood
--- src/crypto.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Applied, thanks.
I amended the description of your earlier patch to refer to 'aes_siv_encrypt'
Regards,
-Denis