fix write

This commit is contained in:
lxsang 2019-12-19 09:58:19 +01:00
parent 348dd45385
commit 2562c06f31
2 changed files with 3 additions and 3 deletions

View File

@ -250,10 +250,10 @@ void load_config(const char *file)
LOG("SSL enable %d", server_config.usessl); LOG("SSL enable %d", server_config.usessl);
LOG("SSL cert %s", server_config.sslcert); LOG("SSL cert %s", server_config.sslcert);
LOG("SSL key %s", server_config.sslkey); LOG("SSL key %s", server_config.sslkey);
if(!server_config.ssl_cipher) /*if(!server_config.ssl_cipher)
LOG("SSL Cipher suite: %s", "HIGH"); LOG("SSL Cipher suite: %s", "HIGH");
else else
LOG("SSL Cipher suite: %s", server_config.ssl_cipher); LOG("SSL Cipher suite: %s", server_config.ssl_cipher);*/
#endif #endif
} }
LOG("%d mimes entries found", server_config.mimes->size); LOG("%d mimes entries found", server_config.mimes->size);

View File

@ -10,7 +10,6 @@ static int server_sock = -1;
// define the cipher suit used // define the cipher suit used
// dirty hack, this should be configured by the configuration file // dirty hack, this should be configured by the configuration file
// #define CIPHER_SUIT "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256"
#define CIPHER_SUIT "HIGH" #define CIPHER_SUIT "HIGH"
static int ssl_session_ctx_id = 1; static int ssl_session_ctx_id = 1;
@ -61,6 +60,7 @@ void configure_context(SSL_CTX *ctx)
// set the cipher suit // set the cipher suit
config_t * cnf = config(); config_t * cnf = config();
const char* suit = cnf->ssl_cipher?cnf->ssl_cipher:CIPHER_SUIT; const char* suit = cnf->ssl_cipher?cnf->ssl_cipher:CIPHER_SUIT;
LOG("Cirpher suit used: %s", suit);
if (SSL_CTX_set_cipher_list(ctx, suit) != 1) if (SSL_CTX_set_cipher_list(ctx, suit) != 1)
{ {
ERR_print_errors_fp(stderr); ERR_print_errors_fp(stderr);