-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add CKA_DERIVE flag in server's private key template #424
Conversation
At the moment there is no good way via OPenSSL APIs to tell what the intended use of a key is, so while not ideal I guess adding CKA_DERIVE by default may be the only good option here. |
any chance you can contribute a test that would show the failure ? |
This commit adds CKA_DERIVE flag in server's private key template which is required by optee subsystem. Tested TLS1.2 with the change. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com>
Hi @simo5, I can contribute a test to show failure, it would be helpful, if you can share the steps to compile tests and run them. |
@kshitizvars you should be able to run test by just doing: You will need at least one of the token dependencies installed, or all tests will end up being skipped. Adding a test is a matter of adding a script or a binary under tests/ and modifying tests/meson.build accordingly. I am also ok if you provide instructions to reproduce via openssl commands, and I can code up a script quickly that way. |
Hi @simo5 1. For running the test, you need one key with no CKA_DERIVE capability, for this I have used below p11tool command:-
Note:- Key generated by p11tool doesn't have DERIVE capability enabled, by default. Issue will only be seen with key with no derive capability. 2. Derive key using pkeyutl command:- Please let me know, if you require any other thing. |
Hi @simo5, Any more comments on this? |
@kshitizvars sorry with vacations and stuff we are being a little slow replying. |
Hi @simo5 Just checking, if you came back from vacations. |
Yup! |
Description
This commit adds CKA_DERIVE flag in server's private key template which gets checked by optee subsystem to derive shared secret. Tested TLS1.2 with the change.
Without this flag enabled, tls connection fails while deriving shared secret.
This change is in common code, please let me know where I can change instead of changing common code.
Checklist
Reviewer's checklist: