Consolidation and Enhancement of BSD Socket Layer#4660
Conversation
|
Hi Kağan! Thanks a lot for looking into this. I didn't look into your code so far, just a quick reply to:
You can use those CLI-tools to quickly set up and test a TLS client and/or server. It makes sense to test those extensively, as they make use of the socket abstraction API, as you know. The easiest way to test them is via the CLI-tests. For that, just build the library as usual and enable the CLI. Eg. like that: The CLI-tests are implemented as a bunch of python functions in This runs several tests with a Botan tls_client connecting to a Botan tls_server with different protocol configurations. This should be enough to effectively test those CLI tools. |
|
Thanks, @reneme. Your guidance was extremely helpful. I reviewed and updated my ninja and ccache tools:
Then, after compiling the project, I ran the command you shared: The result seems to be successful:
I would like to state that I am open to doing additional testing and improvements. After reviewing the code content, we can refactor the code for readability if necessary. I am open to additional feedback. Thanks again for your time and support. Note: I also want to add. There are still repetitive structures in these sections. But I know that major edits will not be accepted. If this PR goes well and I embrace the scope a little more, we can make another simplification with your guidance. I have found the time to look at this problem again. I see that 19 out of 38 tests failed, but the Nightly build completed successfully. I will look for errors and try to fix them. Then if you specify any changes you want to make to the parts we reviewed, I will try to make them. First I look this -> InternalError: No header guard start found in ./src/lib/utils/socket/socket_platform.h |
e05cb39 to
a27b653
Compare
7f9260a to
b720e7b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
d216790 to
c53c16e
Compare
8c37e42 to
14cedad
Compare
reneme
left a comment
There was a problem hiding this comment.
This looks like a decent improvement to me now. Thanks a lot! I'd nevertheless appreciate @randombit to have a final look at this. From my side: LGTM.
|
Thank you for sharing your knowledge with me and guiding me. I have gained new knowledge. @randombit can be merged after checking. I am just a message away if new edits are needed. Good day and see you for new merge requests. |
dff0bc5 to
1f97ef2
Compare
ace51f3 to
5159109
Compare
|
It has been over a year since these improvements were made. Most of the files contain changes, however minor. I believe this improvement needs to be revisited comprehensively, so for now I am closing this in favor of #5422. |
Hello Botan Development Team,
In reference to Issue #2216, I have undertaken the consolidation and enhancement of the BSD socket layer. This endeavor involved refactoring redundant code within socket.cpp, socket_udp.cpp, and cli/socket_utils.h to foster a more streamlined and maintainable architecture.
Post-refactoring, the codebase compiles successfully, and the botan-test suite executes without errors. However, I am encountering challenges in testing the tls-server and tls-client applications. I would greatly appreciate guidance and assistance in effectively conducting these tests.
As a newcomer to the Botan project, I am impressed by its adherence to high C++ standards, utilization of CMake, and comprehensive documentation via Doxygen. I am eager to contribute to both my personal development and the project's advancement.
I recognize that further simplification could be applied to the files in question. Nonetheless, I am aware that extensive modifications can complicate analysis and review processes. Following this PR, I am open to implementing additional refinements based on your guidance.
I acknowledge that there may be errors in my contributions and am open to making necessary changes. I welcome any feedback and am willing to collaborate to ensure the highest quality of code.
Note: I checked the necessary files with clang-format to ensure that they comply with the file standards. However, despite updating to the latest version, I still received warnings on Debian 12 about "RequiresClausePositin and IndentRequiresClause", so I removed them.
Thank you for considering my contribution.
Sincerely