[rt-commit] r203 - in /redwax-tool/trunk: ChangeLog redwax_p11kit.c
rt-commit at redwax.eu
rt-commit at redwax.eu
Tue Feb 18 13:56:57 CET 2025
Author: minfrin at redwax.eu
Date: Tue Feb 18 13:56:56 2025
New Revision: 203
Log:
Rename reserved words 'true' and 'false'.
Modified:
redwax-tool/trunk/ChangeLog
redwax-tool/trunk/redwax_p11kit.c
Modified: redwax-tool/trunk/ChangeLog
==============================================================================
--- redwax-tool/trunk/ChangeLog (original)
+++ redwax-tool/trunk/ChangeLog Tue Feb 18 13:56:56 2025
@@ -1,8 +1,11 @@
Changes with v0.9.8
+ *) Rename reserved words 'true' and 'false'.
+ [Graham Leggett]
+
*) Correct the call signatures of the hook definitions
- for each module.
+ for each module. [Graham Leggett]
*) Simplify completion code for non quoted options.
[Graham Leggett]
Modified: redwax-tool/trunk/redwax_p11kit.c
==============================================================================
--- redwax-tool/trunk/redwax_p11kit.c (original)
+++ redwax-tool/trunk/redwax_p11kit.c Tue Feb 18 13:56:56 2025
@@ -381,7 +381,7 @@
{
CK_OBJECT_CLASS certificateClass = CKO_CERTIFICATE;
CK_CERTIFICATE_TYPE cert_type;
- CK_BBOOL true = CK_TRUE;
+ CK_BBOOL tr = CK_TRUE;
CK_BBOOL trusted = CK_FALSE;
CK_OBJECT_HANDLE cert_obj;
CK_ATTRIBUTE_PTR attr;
@@ -412,8 +412,8 @@
redwax_pkcs11_add_attribute(template, CKA_CLASS, (void *)&certificateClass,
sizeof(certificateClass));
- redwax_pkcs11_add_attribute(template, CKA_TOKEN, (void *)&true,
- sizeof(true));
+ redwax_pkcs11_add_attribute(template, CKA_TOKEN, (void *)&tr,
+ sizeof(tr));
/* LABEL comes first from the URL... */
attr = p11_kit_uri_get_attribute(parsed, CKA_LABEL);
@@ -599,8 +599,8 @@
// https://github.com/OpenSC/OpenSC/blob/master/src/tools/pkcs11-tool.c
CK_OBJECT_CLASS privateKeyClass = CKO_PRIVATE_KEY;
- CK_BBOOL true = CK_TRUE;
- CK_BBOOL false = CK_FALSE;
+ CK_BBOOL tr = CK_TRUE;
+ CK_BBOOL fls = CK_FALSE;
CK_OBJECT_HANDLE key_obj;
CK_ATTRIBUTE_PTR attr;
@@ -637,23 +637,23 @@
redwax_pkcs11_add_attribute(privateTemplate, CKA_CLASS, (void *)&privateKeyClass,
sizeof(privateKeyClass));
- redwax_pkcs11_add_attribute(publicTemplate, CKA_TOKEN, (void *)&true,
- sizeof(true));
- redwax_pkcs11_add_attribute(privateTemplate, CKA_TOKEN, (void *)&true,
- sizeof(true));
-
- redwax_pkcs11_add_attribute(publicTemplate, CKA_PRIVATE, (void *)&false,
- sizeof(false));
- redwax_pkcs11_add_attribute(privateTemplate, CKA_PRIVATE, (void *)&true,
- sizeof(true));
+ redwax_pkcs11_add_attribute(publicTemplate, CKA_TOKEN, (void *)&tr,
+ sizeof(tr));
+ redwax_pkcs11_add_attribute(privateTemplate, CKA_TOKEN, (void *)&tr,
+ sizeof(tr));
+
+ redwax_pkcs11_add_attribute(publicTemplate, CKA_PRIVATE, (void *)&fls,
+ sizeof(fls));
+ redwax_pkcs11_add_attribute(privateTemplate, CKA_PRIVATE, (void *)&tr,
+ sizeof(tr));
/* imported private keys are outside the token already, by default mark the
* keys non-sensitive and extractable.
*/
- redwax_pkcs11_add_attribute(privateTemplate, CKA_SENSITIVE, (void *)&false,
- sizeof(false));
- redwax_pkcs11_add_attribute(privateTemplate, CKA_EXTRACTABLE, (void *)&true,
- sizeof(true));
+ redwax_pkcs11_add_attribute(privateTemplate, CKA_SENSITIVE, (void *)&fls,
+ sizeof(fls));
+ redwax_pkcs11_add_attribute(privateTemplate, CKA_EXTRACTABLE, (void *)&tr,
+ sizeof(tr));
/* ID comes from the URL... */
attr = p11_kit_uri_get_attribute(parsed, CKA_ID);
More information about the rt-commit
mailing list