-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
@@ -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 |
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.
I guess this makes sense in principle but is there a strong reason why do we want to enforce it?
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.
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.
Don't forget to squash
Adapt the HsmKeyParams to use a Builder Pattern instead of a struct