You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-28 18:37:25 +03:00
There is some confusion in the PKCS#11 standard, where the doc says nothing about this field, while the official C header has it: https://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/errata01/os/include/pkcs11-v2.40/pkcs11t.h Nevertheless, the header files contain the normative definition. Add code to accept both versions of the CK_GCM_PARAMS structure, with or without the ulIvBits field. Detection is based on the size of the mechanism parameter. When a GCM mechanism parameter without the ulIvBits field is encountered, it is translated into a GCM parameter with that field, setting ulIvBits to ulIvLen * 8. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>