| 21 | #define SERVER_PORT "47443" |
| 22 | |
| 23 | SSL_CTX *create_context() |
| 24 | { |
| 25 | const SSL_METHOD *method; |
| 26 | SSL_CTX *ctx; |
| 27 | |
| 28 | SSL_library_init(); |
| 29 | OpenSSL_add_all_algorithms(); |
| 30 | SSL_load_error_strings(); |
| 31 | method = TLS_client_method(); |
| 32 | ctx = SSL_CTX_new(method); |
| 33 | if (!ctx) |
| 34 | { |
| 35 | fprintf(stderr, "SSL_CTX_new failed\n"); |
| 36 | exit(EXIT_FAILURE); |
| 37 | } |
| 38 | |
| 39 | return ctx; |
| 40 | } |
| 41 | |
| 42 | int main(int argc, char **argv) |
| 43 | { |