F-Stack / f-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.
http://www.f-stack.org
Other
3.82k stars 891 forks source link

Is it possible to link with other ssl libraries? #803

Open renzibei opened 7 months ago

renzibei commented 7 months ago

Hello,

I'm currently working on a project that involves building a TLS library based on F-Stack. It seems that F-Stack is linked with OpenSSL when built. My project, however, requires integrating an alternative SSL library, specifically BoringSSL, instead of OpenSSL.

After integrating BoringSSL with my F-Stack based application, I've encountered runtime errors specifically related to SSL operations. These errors do not occur when:

  1. The application does not utilize F-Stack.
  2. The application uses F-Stack in conjunction with OpenSSL.

Given the above, I'm seeking advice or guidance on the following:

  1. Compatibility Concerns: Are there known compatibility issues between F-Stack and SSL libraries other than OpenSSL, such as BoringSSL? If so, what are the common pitfalls and how might they be addressed?
  2. Configuration Adjustments: Are there specific configurations or adjustments required within F-Stack to facilitate the use of an alternative SSL library like BoringSSL? This might include modifications to the build process, linking strategies, or runtime configurations.

Any help or guidance on this matter would be greatly appreciated. Integrating BoringSSL (or other SSL libraries) is a critical component of our project, and we're keen on resolving these runtime errors to move forward.

Thank you for your time and assistance.

Chithesus commented 6 months ago
  1. how do you build a TLS library based on FStack ? the new TLS library linked .so of FStack?
  2. I am also need TLS support, I am confused of how to
renzibei commented 6 months ago

@Chithesus I found the problem is that the linking options that I use to link my program include the ones that are needed for FStack and DPDK, among which, the -lssl or -lcrypto are listed. The FStack and DPDK are built with the system openssl. The current workaround is to use the system openssl as well in my project, which will share the symbols with fstack. To solve this program, I think we need to change the link options. We should create a method to avoid including so many linking options that are not intended for our custom projects. For example, we can try to create a static library to pack f-stack and part of our project (this part cannot use other ssl libraries). And then, we link this library to our main project.

Chithesus commented 6 months ago

Thanks for your mail.邮件已收,谢谢

Chithesus commented 6 months ago

@Chithesus I found the problem is that the linking options that I use to link my program include the ones that are needed for FStack and DPDK, among which, the -lssl or -lcrypto are listed. The FStack and DPDK are built with the system openssl. The current workaround is to use the system openssl as well in my project, which will share the symbols with fstack. To solve this program, I think we need to change the link options. We should create a method to avoid including so many linking options that are not intended for our custom projects. For example, we can try to create a static library to pack f-stack and part of our project (this part cannot use other ssl libraries). And then, we link this library to our main project.

should I rebuild openssl with fstack?

  1. build fstack dpdk with you TLS library, remove .so from openssl
  2. link fstack dpdk form 1, and your own TLS library so , if you finished, tell me the result;