docker build -t openssl_dtls:stretch -f Dockerfile.stretch .
docker run --rm openssl_dtls:stretchdocker build -t openssl_dtls:buster -f Dockerfile.buster .
docker run --rm openssl_dtls:buster| FROM debian:buster | |
| RUN apt-get update && apt-get install -y openssl libssl-dev gcc | |
| COPY example.c /example.c | |
| RUN gcc -I/usr/include/openssl -lssl -lcrypto -o example example.c | |
| CMD ["/example"] |
| FROM debian:stretch | |
| RUN apt-get update && apt-get install -y openssl libssl-dev gcc | |
| COPY example.c /example.c | |
| RUN gcc -I/usr/include/openssl -lssl -lcrypto -o example example.c | |
| CMD ["/example"] |
| #include <stdio.h> | |
| #include <openssl/ssl.h> | |
| int main(int argc, char* argv) { | |
| SSL_CTX *context = SSL_CTX_new(DTLS_method()); | |
| unsigned long error_code = ERR_peek_error(); | |
| if (error_code) { | |
| char buf[512]; | |
| ERR_error_string_n(error_code, &buf, 512); | |
| printf("Error create in SSL context: %s\n", buf); | |
| return 1; | |
| } else if (!context) { | |
| printf("No error but the context is empty\n"); | |
| return 1; | |
| } else { | |
| printf("OK\n"); | |
| return 0; | |
| } | |
| } |
This indeed works and removes openssl system version without uninstalling node and lots of other packages:
sudo dpkg -r --force-depends "openssl"
And it indeed fixes the test above! Yay! Thanks!
Is there a workaround to this other than
?
Because I'd like to be able to use WebRTC which uses DTLS on my Raspberry Pi Zero (Buster):
https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues/35#note_865398
I guess I could just recompile the WebRTC plugin and ignore the return code, if the context is still good? It sounds like it's just a false error code left in error_code.
Is it something to do with some global set min TLS version?