-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Improve AES hardware-only check #8281
Improve AES hardware-only check #8281
Conversation
Signed-off-by: Dave Rodgman <[email protected]>
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.
LGTM, I prefer the way this reverses things
Signed-off-by: Dave Rodgman <[email protected]>
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.
LGTM
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.
LGTM
And in case people hit the compiler warnings and search, the output you get when setting
|
It's annoying that the compiler generates all the other stuff instead of stopping at #error, but it's not really worth the code churn to fix it |
8fc18ba
805f345
to
e81a632
Compare
Sorry, accidentally updated this by pushing to the wrong branch. I've reset to the point of review approval. |
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.
LGTM
Signed-off-by: Dave Rodgman <[email protected]>
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.
LGTM
Description
Looking at #7384 (adds MBEDTLS_AES_USE_HARDWARE_ONLY), we complain with a #error message if this is set on x86 / x86_64 and MBEDTLS_AESNI_C is not set, and similar for Arm.
But if we set AES_USE_HARDWARE_ONLY on some other platform, there's no clean error about "not all prerequisites set", only an unexplained compile fail. This PR fixes that gap.
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")