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 <firstname.lastname@example.org>
Commit-Queue: David Drysdale <email@example.com>
Tested-by: David Drysdale <firstname.lastname@example.org>
3 files changed