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

Use Builder Pattern for HsmKeyParams #156

Merged
merged 9 commits into from
Nov 13, 2023
Merged

Conversation

cps-b
Copy link
Contributor

@cps-b cps-b commented Nov 6, 2023

Adapt the HsmKeyParams to use a Builder Pattern instead of a struct

@@ -261,8 +261,9 @@ openssl::SSL_EVP_PKEY_Ptr HsmEngine::generateKey(const ECCSpec &spec,
pkcs11ECCSpec.curve = curve.c_str();

PKCS11_params _params;
_params.extractable = static_cast<unsigned char>(params.cka_extractable);
_params.sensitive = static_cast<unsigned char>(params.cka_sensitive);
// If the key is extractable it shouldn't be sensitive and vice versa
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this makes sense in principle but is there a strong reason why do we want to enforce it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@istepic This was requested in the review from @garw in #155. We should hide the PKCS#11 internals...

Copy link
Collaborator

@istepic istepic left a comment

Choose a reason for hiding this comment

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

Don't forget to squash

@cps-b cps-b merged commit 0169669 into openssl3 Nov 13, 2023
35 checks passed
@cps-b cps-b deleted the cka-attributes-builder branch November 13, 2023 08:52
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.

2 participants