Is it possible to use OpenSSL in a project created with platformio?

Hi, I am doing a job of converting a cryptographic algorithm from x86 architecture to ARM.
For my work I have been provided with an esp8266 wemos d1 r2.
The libraries I need to include are “openssl/conf.h,” “openssl/evp.h,” and openssl/err.h.
From PlatformIO’s library manager I did not find openssl but only a library called “wolfSSL” (which I installed successfully).
For several reasons I would be better off sticking with openssl.

Is it somehow possible to install openssl on a PlatformIO project?
If it is possible I might also consider “partial” implementation of the library.

Do you have any recommendations? Or is the only way is to switch to another library?

Thanks for your attention guys.

This makes no sense. The ESP8266 is an XTensa (Tensilica Diamond 106), not ARM.

OpenSSL is not really meant for small embedded targets (microcontrollers). You have much better chances using mbedTLS instead. Frameworks like Arduino-ESP8266 have that builtin. Things like WolfSSL and BearSSL exist, too.

Espressif for ESP32 used to have an OpenSSL API wrapper that converted OpenSSL calls to mbedTLS calls, but even that was discontinued.

For ESP8266-RTOS-SDK (which PlatformIO sadly doesn’t support as framework), Espressif’s official OpenSSL API wrapper still exists: https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/components/openssl/OpenSSL-APIs.rst. Again, this just maps to mbedTLS calls. And if Espressif does that, instead of compiling OpenSSL for XTensa, then there is for sure a good reason.

Everything that OpenSSL is able to do, mbedTLS should be able to do it, too. They have good documentation.

1 Like

I thank you for the clarification and for taking your time!