-
Notifications
You must be signed in to change notification settings - Fork 28
Call wolfCrypt_SetCb_fips in wolfengine_bind for FIPS builds. #177
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
src/we_internal.c
Outdated
| WOLFENGINE_ENTER(WE_LOG_ENGINE, "wolfengine_bind"); | ||
|
|
||
| #ifdef HAVE_FIPS | ||
| wolfCrypt_SetCb_fips(fipsCb); |
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.
Need to include fips_test.h?
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.
Yep! Will fix.
src/we_internal.c
Outdated
| printf("hash = %s\n", hash); | ||
|
|
||
| if (err == IN_CORE_FIPS_E) { | ||
| printf("In core integrity hash check failure. Copy above hash\n"); |
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 the initial "In" seems weird. I think it should be
Core integrity hash check failure. Copy above hash....
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.
Reworded.
src/we_internal.c
Outdated
| printf("hash = %s\n", hash); | ||
|
|
||
| if (err == IN_CORE_FIPS_E) { | ||
| printf("In core integrity hash check failure. Copy above hash\n"); |
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 should have more markers to make it more prominent. like
printf("*******************************************\n");
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.
Added.
We've had a lot of users come to us for support when wolfEngine can't be found, and the resolution often ends up being that the FIPS module integrity check failed and the expected HMAC value needs to be updated. This commit sets up a callback that will indicate the problem and how to fix it, just like we do for testwolfcrypt in wolfSSL.
We've had a lot of users come to us for support when wolfEngine can't be found,
and the resolution often ends up being that the FIPS module integrity check
failed and the expected HMAC value needs to be updated. This commit sets up
a callback that will indicate the problem and how to fix it, just like we do
for testwolfcrypt in wolfSSL.