Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkcs11: Fix return value when trying to open parallel session #4294

Merged

Conversation

vesajaaskelainen
Copy link
Contributor

It is mandatory to have CKF_SERIAL_SESSION set when invoking
C_OpenSession(). Return value CKR_SESSION_PARALLEL_NOT_SUPPORTED must be
returned.

Specified in:
PKCS #11 Cryptographic Token Interface Base Specification Version 2.40
Plus Errata 01
5.6 Session management functions
C_OpenSession

Signed-off-by: Vesa Jääskeläinen [email protected]

@vesajaaskelainen
Copy link
Contributor Author

Goes with OP-TEE/optee_client#245 and OP-TEE/optee_test#476.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Reviewed-by: Etienne Carriere <[email protected]>.
In commit log, i suggest a minor rephrasing, the 2nd sentence looks unfinished to me (but I'm not an English native speaker):

It is mandatory to have CKF_SERIAL_SESSION set when invoking
C_OpenSession() unless what the function shall return CKR_SESSION_PARALLEL_NOT_SUPPORTED.

@vesajaaskelainen
Copy link
Contributor Author

Reviewed-by: Etienne Carriere <[email protected]>.
In commit log, i suggest a minor rephrasing, the 2nd sentence looks unfinished to me (but I'm not an English native speaker):

It is mandatory to have CKF_SERIAL_SESSION set when invoking
C_OpenSession() unless what the function shall return CKR_SESSION_PARALLEL_NOT_SUPPORTED.

Reworded a bit differently, please check that you are still happy with that.

Applied tags.

@vesajaaskelainen
Copy link
Contributor Author

I will add "ta: " keyword to subject line of commits.

It is mandatory to have CKF_SERIAL_SESSION set when invoking
C_OpenSession(). When omitted CKR_SESSION_PARALLEL_NOT_SUPPORTED must be
returned.

Specified in:
PKCS OP-TEE#11 Cryptographic Token Interface Base Specification Version 2.40
Plus Errata 01
5.6 Session management functions
C_OpenSession

Reviewed-by: Etienne Carriere <[email protected]>
Signed-off-by: Vesa Jääskeläinen <[email protected]>
@jforissier jforissier merged commit 08774c8 into OP-TEE:master Jan 4, 2021
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.

3 participants