chaps: Prevent interspersal of incremental and one-shot operations.
PKCS#11 spec has variants of the following (from C_Encrypt):
"C_Encrypt can not be user to terminate a multi-part operation, and
must be called after C_EncryptInit without intervening
So track whether a one-shot or multi-part operation has been started, and
reject the other style if so.
TEST=Chaps unit tests (with ASAN) plus PKCS11 tests
Reviewed-by: Darren Krahn <email@example.com>
Commit-Queue: David Drysdale <firstname.lastname@example.org>
Tested-by: David Drysdale <email@example.com>
3 files changed