A NULL mechanism pointer is valid for C_*Init functions to cancel the
operation. Since 852ccd8d we encoded it with a CK_MECHANISM_TYPE 0 as
an indicator, though it clashes with CKM_RSA_PKCS_KEY_PAIR_GEN (0).
This patch changes the encoding to use a special value (0xffffffff) to
indicate that and also properly advance the offset when reading.
coverage: 69.471% (+0.04%) from 69.431%
when pulling 684770413f771ded39b1c85717edabc1fccf89a7 on ueno:wip/dueno/mech-fixes
into 66d6b42ef8dd84fcd8e199ac9f23f822f1a058c9 on p11-glue:master.
A NULL mechanism pointer is valid for C_*Init functions to cancel the operation. Since 852ccd8d we encoded it with a CK_MECHANISM_TYPE 0 as an indicator, though it clashes with CKM_RSA_PKCS_KEY_PAIR_GEN (0). This patch changes the encoding to use a special value (0xffffffff) to indicate that and also properly advance the offset when reading.