user: imporve #463, impact on the performance of the tested program #471
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.
设计思路
问题
解决思路
SSL_connect
或者以服务端角色SSL_accept
,最终都会进入ssl/statem/statem.c
的state_machine
函数进行TLS握手。SSL
开头的函数。同步
调用时,TLS握手成功会返回1,也就是ret = 1
,即需要在这个变量赋值后,被调用的函数,才能拿到符合要求的内存数据。state_machine
函数内符合要求的就只有SSL_get_wbio
了。异步 (BIO)
调用时,还需要增加SSL_in_before
函数。Design concept
Question
Solution
SSL_connect
in the OpenSSL library in a client role orSSL_accept
in a server role, the execution flow ultimately enters thestate_machine
function inssl/statem/statem.c
for TLS handshake.state_machine
function that start with an uppercaseSSL
.ret = 1
. Thus, after this variable is assigned, the called functions can obtain the desired memory data. the only function within thestate_machine
function that meets the requirements isSSL_get_wbio
.asynchronous (BIO)
manner, it is also necessary to add theSSL_in_before
function.