-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use OpenSSL to add support for SSL communication with the server. Scr…
…ipt add debug mode support. (#273) * Modification item: (1)Add OpenSSL and debug options to the ‘build.sh’ script. (2)Add the ‘ENABLE_OPENSSL’ macro to cmakelist.txt. (3)Link the ‘libevent_openssl.a’ static library to support OpenSSL. * Modification item: (1)Link static libraries on demand. (2)Add OpenSSL support and use the macro ‘ENABLE_OPENSSL’ to control OpenSSL compilation blocks. (3)Inline member defaults. The default value of the inline member is intuitive and error free, and the redundant structure list can be removed, which is also recommended. (4)Add ignore for vscode configuration in .gitignore. * Add debugging information in debug mode. * Modification item: (1)Add C compiler debugging options. (2)Remove the compiler debugging option from the child test cmake, which will result in inconsistent behavior between the upper and lower cmakes. (3)Move the SSL initialization context into the constructor so that it is constructed only once and the memory leak in the last commit code is fixed. (4)SSL handle is managed to bufferevent without memory management. Forced release will result in double-free. * Modification item: (1)Extract SSL context initialization into a function. (2)Customize std::unique_ptr to manage SSL content and strengthen memory leak management. (3)Add the default certificate configuration path. (4)Add environment variables to dynamically modify the certificate configuration path. (5)Enhance friendly output prompt. (6)The communication function with the server is verified by self signed certificate. (7)Asan and lsan tests have been passed. * Modification item: (1)Add OpenSSL library and compile script. (2)Remove the system dynamic library connection, and use the project OpenSSL static library link instead. (3)Fix some errors in CMakeList.txt. * Modification item: (1)Add OpenSSL library and compile script. (2)Remove the system dynamic library connection, and use the project OpenSSL static library link instead. (3)Fix some errors in CMakeList.txt. * Modification item: (1)Remove the OpenSSL option that controls whether or not it is required. (2)Remove the ENABLE_OPENSSL macro. OpenSSL is supported by default. (3)Add API to control whether OpenSSL support is enabled. (4)Add the ReadProperties utility function. (5)Add certificate related configuration in the properties configuration file. (6)Add friendly output prompts. * By mistake, I wrote a letter ‘t’ short. * Modification item: (1)Format the code with the 'format.sh' script. (2)SSL is turned off by default. * change openssl static library install path. * using built-in openssl to compile libevent. * Modification item: (1)Moving/Returning temporary object prevents copy elision, which may cause RVO and NRVO are invalid technologies. (2)Libevent only verifies whether the OpenSSL dynamic library has 'SSL_new' function as the basis for the existence of OpenSSL. (3)Add a dependent static library to MRI. * remove comments for code format. * Fix the missing packing problem of static library packing script under Mac OS. For example, there is buffer. o in libcrypto. a, and buffer. o in libevent_core. a, but the symbols of the two are complementary. The method of using 'ar x' and 'ar cru' will result in the loss of symbol in one of the above two buffer. o. * chors(style): format code style for eventloop.
- Loading branch information
1 parent
b29bf5b
commit 81f36ec
Showing
39 changed files
with
547 additions
and
135 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ build | |
libs/signature/lib | ||
tmp_* | ||
Testing | ||
.vscode |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.