OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

pkcs11 message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Updated Proposal: All constants should have UL suffix


All numeric constants in the specification section "A. Manifest
Constants" should have the suffix 'UL' on them. This allows the code
like this to return the correct result:

  sizeof(CKO_DATA)

Among other things, it also allows the constants to be passed correctly
to C varargs functions.

Since all document edits for this would be tedious. I'll just give a few
examples:

- #define CKU_SO         0
+ #define CKU_SO         0UL

and

- #define CKA_CLASS      0x00000000
+ #define CKA_CLASS      0x00000000UL

and

- #define CKA_WRAP_TEMPLATE	(CKF_ARRAY_ATTRIBUTE|0x00000211)
+ #define CKA_WRAP_TEMPLATE	(CKF_ARRAY_ATTRIBUTE|0x00000211UL)

Above applies to every constant in the specification section "A.
Manifest Constants". All of the constants in this section are intended
for use with CK_ULONG or types defined as CK_ULONG.

In addition the reference headers should be updated. All of the numeric
#define'd constants in the reference headers should have the suffix UL,
with the exception of:

CRYPTOKI_VERSION_MAJOR
CRYPTOKI_VERSION_MINOR
CRYPTOKI_VERSION_AMENDMENT
CK_TRUE
CK_FALSE

Cheers,

Stef


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]