make ssl support compile

This commit is contained in:
Green Sky 2023-12-07 01:51:17 +01:00
parent 3bf7660b85
commit edc713c3bf
No known key found for this signature in database
3 changed files with 11 additions and 2 deletions

View File

@ -1,8 +1,10 @@
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14...3.24 FATAL_ERROR)
# cmake setup begin
project(libircclient)
find_package(OpenSSL REQUIRED)
add_library(libircclient
./libircclient/include/libircclient.h
./libircclient/include/libirc_rfcnumeric.h
@ -27,4 +29,9 @@ add_library(libircclient
)
target_include_directories(libircclient PUBLIC ./libircclient/include)
target_compile_definitions(libircclient PUBLIC ENABLE_SSL=1)
target_link_libraries(libircclient PUBLIC
OpenSSL::SSL
#OpenSSL::Crypto
)

View File

@ -163,7 +163,7 @@ static int ssl_init_context( irc_session_t * session )
#endif
// Initializes the SSL context. Must be called after the socket is created.
static int ssl_init( irc_session_t * session )
int ssl_init( irc_session_t * session )
{
static int ssl_context_initialized = 0;

View File

@ -20,4 +20,6 @@
int session_socket_read( irc_session_t * session );
int session_socket_write( irc_session_t * session );
int ssl_init( irc_session_t * session );
#endif /* INCLUDE_IRC_SSL_H */