Skip to content

Add new PKCS#11 indestructible attribute feature#404

Open
sahesaha wants to merge 1 commit into
OP-TEE:masterfrom
sahesaha:add-new-pkcs11-Indestructible-attribute
Open

Add new PKCS#11 indestructible attribute feature#404
sahesaha wants to merge 1 commit into
OP-TEE:masterfrom
sahesaha:add-new-pkcs11-Indestructible-attribute

Conversation

@sahesaha

@sahesaha sahesaha commented Nov 3, 2025

Copy link
Copy Markdown

This change defines attributes needed for Indestructible attribute feature.

@sahesaha sahesaha force-pushed the add-new-pkcs11-Indestructible-attribute branch from 83f89d6 to 72f1d94 Compare November 3, 2025 14:21
@github-actions

github-actions Bot commented Dec 4, 2025

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Dec 4, 2025
@sahesaha

sahesaha commented Dec 8, 2025

Copy link
Copy Markdown
Author

Commenting to keep alive.

@github-actions github-actions Bot removed the Stale label Dec 9, 2025
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Jan 8, 2026
@jenswikl

jenswikl commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Ping @etienne-lms

@jenswikl jenswikl removed the Stale label Jan 8, 2026

@etienne-lms etienne-lms left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you refine the commit message: prefix the header line + add a small description in the message body? E.g.:

libckteec: Add PKCS#11 vendor specific indestructible attribute

Add CKA_OPTEE_INDESTRUCTIBLE vendor specific attribute ID
for object that should never be destroyed, even on token re-initialization.

Signed-off-by: ...

Comment thread libckteec/include/pkcs11.h Outdated
#define CKA_SUPPORTED_CMS_ATTRIBUTES 0x0503
#define CKA_ALLOWED_MECHANISMS (0x0600 | CKF_ARRAY_ATTRIBUTE)
/* Vendor Defined Indestructible Attribute */
#define CKA_INDESTRUCTIBLE 0x80000010

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define CKA_INDESTRUCTIBLE 0x80000010
#define CKA_INDESTRUCTIBLE (0x0010 | CKA_VENDOR_DEFINED)

Also, since it is an OP-TEE specific attribute, I think it should be renamed CKA_OPTEE_INDESTRUCTIBLE.

Comment thread libckteec/include/pkcs11_ta.h Outdated
Comment on lines +1140 to +1143
/* Vendor extension: reserved for undefined ID (~0U) */
PKCS11_CKA_UNDEFINED_ID = PKCS11_UNDEFINED_ID,
/* Vendor Defined Indestructible Attribute */
PKCS11_CKA_INDESTRUCTIBLE = 0x80000010,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, could you keep the IDs sorted by increasing value:

+	/* Vendor Defined Indestructible Attribute */
+	PKCS11_CKA_OPTEE_INDESTRUCTIBLE		= 0x80000010,
	/* Vendor extension: reserved for undefined ID (~0U) */
	PKCS11_CKA_UNDEFINED_ID			= PKCS11_UNDEFINED_ID,

I think it would be nice to introduce also PKCS11_VENDOR_DEFINED (and also PKCS11_CKA_ARRAY_ATTRIBUTE) macros:

	PKCS11_CKA_OPTEE_INDESTRUCTIBLE		= (PKCS11_CKA_VENDOR_DEFINED |
						   0x0010),

@sahesaha sahesaha force-pushed the add-new-pkcs11-Indestructible-attribute branch from 72f1d94 to 8f1a5cf Compare January 8, 2026 10:49
@sahesaha

sahesaha commented Jan 8, 2026

Copy link
Copy Markdown
Author

@etienne-lms, addressed and changed the macros accordingly the macro added for this requirement in optee_ta to what you suggested there.

@sahesaha sahesaha force-pushed the add-new-pkcs11-Indestructible-attribute branch from 8f1a5cf to 2234a7a Compare January 8, 2026 12:42
Add CKA_OPTEE_INDESTRUCTIBLE vendor specific attribute ID
for object that should never be destroyed, even on token re-initialization.

Reviewed-by: Neeraj Soni <neersoni@qti.qualcomm.com>
Signed-off-by: Saheli Saha <sahesaha@qti.qualcomm.com>
@sahesaha sahesaha force-pushed the add-new-pkcs11-Indestructible-attribute branch from 2234a7a to ba80ea5 Compare January 8, 2026 12:43
@sahesaha

sahesaha commented Jan 8, 2026

Copy link
Copy Markdown
Author

@etienne-lms, addressed and changed the macros accordingly the macro added for this requirement in optee_ta to what you suggested there.

Comment on lines 1140 to +1143
/* Vendor extension: reserved for undefined ID (~0U) */
PKCS11_CKA_UNDEFINED_ID = PKCS11_UNDEFINED_ID,
/* Vendor Defined Indestructible Attribute */
PKCS11_CKA_OPTEE_INDESTRUCTIBLE = 0x80000001,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you intend with tabulation, and swap the 2 IDs:

Suggested change
/* Vendor extension: reserved for undefined ID (~0U) */
PKCS11_CKA_UNDEFINED_ID = PKCS11_UNDEFINED_ID,
/* Vendor Defined Indestructible Attribute */
PKCS11_CKA_OPTEE_INDESTRUCTIBLE = 0x80000001,
/* Vendor Defined Indestructible Attribute */
PKCS11_CKA_OPTEE_INDESTRUCTIBLE = 0x80000001,
/* Vendor extension: reserved for undefined ID (~0U) */
PKCS11_CKA_UNDEFINED_ID = PKCS11_UNDEFINED_ID,

@github-actions

github-actions Bot commented Feb 8, 2026

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Feb 8, 2026
@github-actions github-actions Bot closed this Feb 14, 2026
@sahesaha

Copy link
Copy Markdown
Author

Hi @etienne-lms, can you help reopening this PR so that I can correctly commit as per you latest comment. Actually, was engaged in some tasks since last month, due to inactivity this PR somehow got closed.

@jforissier jforissier reopened this Feb 16, 2026
@etienne-lms

Copy link
Copy Markdown
Contributor

Thanks @jforissier.
@sahesaha, just in case you get a P-R staled and closed, don't mind creating a new one with your very same changes, or an updated version. You can still add a comment referencing the old P-R, for the record.

@github-actions github-actions Bot removed the Stale label Feb 17, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Mar 19, 2026
@sahesaha

Copy link
Copy Markdown
Author

Commenting to keep alive.

@github-actions github-actions Bot removed the Stale label Mar 20, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Apr 19, 2026
@github-actions github-actions Bot closed this Apr 24, 2026
@sahesaha

Copy link
Copy Markdown
Author

@jenswi-linaro can you help restore the PR?

@jenswikl jenswikl reopened this Apr 24, 2026
@jenswikl jenswikl removed the Stale label Apr 24, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label May 25, 2026
@sahesaha

Copy link
Copy Markdown
Author

Commenting to keep alive.

@github-actions github-actions Bot removed the Stale label May 26, 2026
@jenswikl

Copy link
Copy Markdown
Contributor

What's the next step for this PR?

@github-actions

Copy link
Copy Markdown

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions Bot added the Stale label Jun 26, 2026
@sahesaha

Copy link
Copy Markdown
Author

Commenting to keep alive.

@github-actions github-actions Bot removed the Stale label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants