-
Notifications
You must be signed in to change notification settings - Fork 72
Add a allow_export flag to restrict exporting #466
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
Conversation
But you're not exactly solving the problem in #462 - you're still setting the attributes for keys that have |
As per the investigation in here, I checked that those attributes are actually allowed (in Layerscape) but they can't be set to unsecure mode (exportable=true, sensitive=false). It would still work if they explicitely set to the secure mode. That's why I "simplified" what we planned to this. |
Oh, it's because we have a bug 😬 I was wondering wth is going on, because what you're saying and what Sahil reported are at odds - most keys we generate for tests have However, see if you can spot something wrong with this: parsec/src/providers/pkcs11/utils.rs Line 97 in 6018d25
|
Folks, if we only patch the entire world of buggy PKCS#11 drivers then this PR could be obsoleted! 🥳 |
Unfortunately not, see my comment above |
Oh, right. That's totally something to improve. And what a coincidence that buggy PKCS#11 drivers exposed a bug in parsec :) Fortunately this one is easy to fix. |
Should I add the fix in this PR? Would have been funny if you did not spot the inverted logic and the double bug in Parsec and there made the key secure |
I think so - it's only one line and related to what's going on in here (and it was discovered via the same conversation). |
I think there's a typo in the test name that failed ^^ :) |
On some PKCS11 implementations, it is not allowed to create a key that can be exported. For that reason, prevent creating exportable keys from the configuration file so that clients can have a better return value. Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
On some PKCS11 implementations, it is not allowed to create a key that
can be exported. For that reason, prevent creating exportable keys from
the configuration file so that clients can have a better return value.
This probably should be written in the book as well, as a new possible return value for generate key.
Fix #462