HomeFreeBSD

crypto: Don't assert for empty output buffers.

Description

crypto: Don't assert for empty output buffers.

It is always valid for crp_payload_output_start to be 0. However, if
an output buffer is empty (e.g. a decryption request with a tag but an
empty payload), the existing assertion failed since 0 is not less than
0.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33193

(cherry picked from commit ec498562b71a5e2baee3556eed7e22947f7abc5d)

Details

Provenance
jhbAuthored on Dec 9 2021, 7:52 PM
Differential Revision
D33193: crypto: Don't assert for empty output buffers.
Parents
rGff9b4d5d031f: cryptosoft: Reject AES-CCM/GCM sessions with invalid key lengths.
Branches
Unknown
Tags
Unknown