ZLToolKit
ZLToolKit copied to clipboard
sslbox mbedtls support
Since the company's other projects use mbedtls, and most are embedded devices, openssl is a bit large.
I modified the toolkit project myself to use mbedtls, and the process can run through, it works under the main function, but it will crash with memory out of bounds when put into qt or other projects.
And it didn't crash in the code.
I don't know if the author has tried to support the mbedtls version, or if anyone has integrated it, you can contribute. I can also upload my incomplete version later.
由于公司其他项目用的是mbedtls,且多是嵌入式设备,openssl有点大。 自己在toolkit工程里改造了一下,使用mbedtls,可以跑通流程,main函数下可以的,但是放到qt或者其他工程里会有内存越界的崩溃。 又没有蹦在代码里。
不知道作者有没有尝试支持mbedtls的版本,或者大家有没有集成过的,可以贡献一下。后边我也可以把我这个不完整的版本传上来
TRANS_BY_GITHUB_AI_ASSISTANT
使用mbedtls的难点是不使用内部的net_socket。数据的收发依赖toolkit的socketclient, ssl只做握手。
mbedtls_ssl_set_bio( &ssl, 0, custom_net_send, custom_net_recv, NULL );
自定义发送:custom_net_send 回调给toolkit 的socket去发送 自定义接收:custom_net_recv tookit recv 的socket数据线放到一个缓存里,custom_net_recv 去缓存里读。
@mtdxc 夏工之前有做过吗,可以给点建议吗? SSLBox.cpp.log SSLBox.h.log
没做过 mbedtls的开发适配 不过openssl是不是也可以裁剪编译?
好的,非常感谢。裁剪这个还没有研究过,主要是公司嵌入式和移动端用了mbedtls 不想再加库了。现在的逻辑勉强可以跑通,但是会崩溃。我再研究下。
好的,非常感谢。裁剪这个还没有研究过,主要是公司嵌入式和移动端用了mbedtls 不想再加库了。现在的逻辑勉强可以跑通,但是会崩溃。我再研究下。
一般的系统都会内存openssl的 否则ssh sever没法运行