You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-24 05:39:17 +03:00
For CBC-PAD the output buffer size sent to ICSF was inflated to at least cipher_text_len so the server does not send back RSN_TOO_SHORT for the padded-then-unpadded output. Validate length against the inflated clear_len (what we told the server) and bv_clear_data.bv_len against the caller's real buffer. When the real buffer is too small for the unpadded result, propagate CKR_BUFFER_TOO_SMALL so the caller can retry. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>