cyignore sslSniffer due to main() conflicts#9773
Open
petertorelli wants to merge 1 commit intowolfSSL:masterfrom
Open
cyignore sslSniffer due to main() conflicts#9773petertorelli wants to merge 1 commit intowolfSSL:masterfrom
petertorelli wants to merge 1 commit intowolfSSL:masterfrom
Conversation
|
Can one of the admins verify this patch? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building for an embedded device, and wanting to include benchmark.c, one would use NO_MAIN_FUNCTION so that wolfcyrpt_benchmark_main() can be called from the application main(). However, sslSniffer/snifftest.c gates main() with NO_MAIN_DRIVER. So if I disable main() in snifftets.c, I lose wolfcrypt_benchmark_main() in benchmark.c. One solution would be to change benchmark.c to not block the wolfcrypt_benchmark_main function but that might impact more than just benchmark.c, so it is easier to just add another .cygnore for sslSniffer. It would be nice to have NO_SSLSNIFFER to exclude the entire sniffer, but again, that would touch code.
Testing
I built a simple PSOC6/PSOCEdge application and using NO_MAIN_FUNCTION + MAIN_NO_ARGS, I can easily link in the benchmarks without needing to change the github repo: it can be configured just with user_settings.h, and if I want a sniffer, I can use NO_CRYPT_BENCHMARK.
Checklist
NO_MAIN_FUNCTION and MAIN_NO_ARG are not documented, nor is .cyignore, so there's no place to update this. Also no tests for .cyignore.