wolfSSL / wolfTPM

wolfTPM is a highly portable TPM 2.0 library, designed for embedded use.
https://www.wolfssl.com
GNU General Public License v2.0
230 stars 55 forks source link

include user_settings.h manually when wolfCrypt is not in use #285

Closed jpbland1 closed 11 months ago

lealem47 commented 11 months ago

Why not move this outside of the WOLFTPM2_NO_WOLFCRYPT guard? That way users can have a separate user_settings.h for configuring wolfTPM instead of modifying their wolfSSL user settings. Same way we do wolfSSH, wolfMQTT, ...

dgarske commented 11 months ago

Just realized that my suggestion would break current builds that use WOLFTPM_USER_SETTINGS and don't have a user_settings.h present. It would a quick fix with $ touch user_setting.h but I get that we'd want to avoid that

This use case would only happen if trying to build wolfTPM without wolfCrypt and not using configure so it would require some type of build settings to be provided. Do you think this could be an issue for anyone in the "wild"?

lealem47 commented 11 months ago

Just realized that my suggestion would break current builds that use WOLFTPM_USER_SETTINGS and don't have a user_settings.h present. It would a quick fix with $ touch user_setting.h but I get that we'd want to avoid that

This use case would only happen if trying to build wolfTPM without wolfCrypt and not using configure so it would require some type of build settings to be provided. Do you think this could be an issue for anyone in the "wild"?

The current patch is fine, I'd guess a very limited number of users with this setup. I was talking about this suggestion https://github.com/wolfSSL/wolfTPM/pull/285#issuecomment-1654521145 to always include user_settings.h even with wolfCrypt when WOLFTPM_USER_SETTINGS is defined