-
Notifications
You must be signed in to change notification settings - Fork 347
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 wrapping and unwrapping capability to CKM_AES_GCM mechanism #641
base: develop
Are you sure you want to change the base?
Conversation
The build seems to fail with Appveyor. However, when looking closer to the logs:
Is something broken in the source code, that prevents building on Windows?
|
@keldonin I found another issue with AES GCM and have a fix in #664. Since the fix would have need to be applied also to the wrapping code, maybe we should think about extracting those AES parameter checks into a common function. I have also refactored the test d155341 to be able to test different sets of parameters. |
return CKR_ARGUMENTS_BAD; | ||
} | ||
iv.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen); | ||
memcpy(&iv[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pIv, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen); |
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 think this requires the same fix as in #664
iv.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen); | ||
memcpy(&iv[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pIv, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulIvLen); | ||
aad.resize(CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen); | ||
memcpy(&aad[0], CK_GCM_PARAMS_PTR(pMechanism->pParameter)->pAAD, CK_GCM_PARAMS_PTR(pMechanism->pParameter)->ulAADLen); |
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 think this requires the same fix as in #664
Please rebase on develop and mark as ready when ready. |
This PR adds wrapping and unwrapping capability to the
CKM_AES_GCM
mechanism.It comes along with new cases to the test suite.