Skip to content

Clarified the PSA_ERROR_BAD_STATE conditions for multi-part operations - #381

Open
athoelke wants to merge 1 commit into
GlobalPlatform:mainfrom
athoelke:multipart-bad-state-conditions
Open

Clarified the PSA_ERROR_BAD_STATE conditions for multi-part operations#381
athoelke wants to merge 1 commit into
GlobalPlatform:mainfrom
athoelke:multipart-bad-state-conditions

Conversation

@athoelke

Copy link
Copy Markdown
Collaborator

In the discussion of #375, which introduces additional operation objects with complex implied state-models, it was noted that the phrasing of the valid/invalid operation states which can give rise to a PSA_ERROR_BAD_STATE error had become complicated, and in places, confusing.

A change in the pattern of these condition clauses is introduced in #375 for the interruptible operations. This PR applies the same pattern to the existing multi-part hash, XOF, MAC, cipher, AEAD, asymmetric signature, key-derivation, and PAKE operations.

Where previously these clauses had been phrased:

The operation state is not valid:

these are now changed to a set of clauses, any of which are sufficient to result in a PSA_ERROR_BAD_STATE response. The result is a pattern that closely matches the style used for other error return values where more than one condition can result in the error.

@athoelke athoelke added this to the Crypto API 1.x milestone Aug 18, 2026
@athoelke athoelke self-assigned this Aug 18, 2026
@athoelke athoelke added clarification Something is confusing or missing in the documentation Crypto API Issue or PR related to the Cryptography API labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clarification Something is confusing or missing in the documentation Crypto API Issue or PR related to the Cryptography API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant