1
The SSL_CTX_new() function works fine but something is strange it sets errno to ENOSYS.
Documentation doesn't say anything about this : https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_new.html
#include <errno.h>
#include <openssl/ssl.h>
int main(int argc, char * argv[]){
SSL_library_init();
SSL_load_error_strings();
perror("A");
SSL_CTX * sslContext = SSL_CTX_new(TLS_server_method());
if (sslContext == NULL){
return EXIT_FAILURE;
}
perror("B");
return 0;
}
this code returns this :
A: Undefined error: 0
B: Function not implemented
My openssl version is : OpenSSL 1.1.1b 26 Feb 2019
Welcome to Super User! What problem are you trying to solve? This seems quite programming-related. – bertieb – 2019-05-27T10:18:38.623
thanks :) I'm trying to understand why SSL_CTX_new sets errno. It might means there is an error somewhere – Maloux – 2019-05-27T10:21:43.180
If this is about a program you yourself are writing and compiling, and your question is about an API giving you an error, it might be better off one of our sister sites such as Stack Overflow
– bertieb – 2019-05-27T10:24:12.493yes it is a program i wrote, i will move to stack overflow, thx – Maloux – 2019-05-27T10:25:48.480