483 |
if (conf_parser_ctx.boot && conf_parser_ctx.pass == 2) |
if (conf_parser_ctx.boot && conf_parser_ctx.pass == 2) |
484 |
{ |
{ |
485 |
if (!(ServerInfo.tls_version & CONF_SERVER_INFO_TLS_VERSION_SSLV3)) |
if (!(ServerInfo.tls_version & CONF_SERVER_INFO_TLS_VERSION_SSLV3)) |
486 |
|
{ |
487 |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3); |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_SSLv3); |
488 |
|
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_SSLv3); |
489 |
|
} |
490 |
|
|
491 |
if (!(ServerInfo.tls_version & CONF_SERVER_INFO_TLS_VERSION_TLSV1)) |
if (!(ServerInfo.tls_version & CONF_SERVER_INFO_TLS_VERSION_TLSV1)) |
492 |
|
{ |
493 |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_TLSv1); |
SSL_CTX_set_options(ServerInfo.server_ctx, SSL_OP_NO_TLSv1); |
494 |
|
SSL_CTX_set_options(ServerInfo.client_ctx, SSL_OP_NO_TLSv1); |
495 |
|
} |
496 |
} |
} |
497 |
#endif |
#endif |
498 |
}; |
}; |
524 |
} |
} |
525 |
|
|
526 |
if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string, |
if (SSL_CTX_use_certificate_file(ServerInfo.server_ctx, yylval.string, |
527 |
|
SSL_FILETYPE_PEM) <= 0 || |
528 |
|
SSL_CTX_use_certificate_file(ServerInfo.client_ctx, yylval.string, |
529 |
SSL_FILETYPE_PEM) <= 0) |
SSL_FILETYPE_PEM) <= 0) |
530 |
{ |
{ |
531 |
yyerror(ERR_lib_error_string(ERR_get_error())); |
yyerror(ERR_lib_error_string(ERR_get_error())); |
533 |
} |
} |
534 |
|
|
535 |
if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file, |
if (SSL_CTX_use_PrivateKey_file(ServerInfo.server_ctx, ServerInfo.rsa_private_key_file, |
536 |
|
SSL_FILETYPE_PEM) <= 0 || |
537 |
|
SSL_CTX_use_PrivateKey_file(ServerInfo.client_ctx, ServerInfo.rsa_private_key_file, |
538 |
SSL_FILETYPE_PEM) <= 0) |
SSL_FILETYPE_PEM) <= 0) |
539 |
{ |
{ |
540 |
yyerror(ERR_lib_error_string(ERR_get_error())); |
yyerror(ERR_lib_error_string(ERR_get_error())); |
541 |
break; |
break; |
542 |
} |
} |
543 |
|
|
544 |
if (!SSL_CTX_check_private_key(ServerInfo.server_ctx)) |
if (!SSL_CTX_check_private_key(ServerInfo.server_ctx) || |
545 |
|
!SSL_CTX_check_private_key(ServerInfo.client_ctx)) |
546 |
{ |
{ |
547 |
yyerror(ERR_lib_error_string(ERR_get_error())); |
yyerror(ERR_lib_error_string(ERR_get_error())); |
548 |
break; |
break; |
2278 |
{ |
{ |
2279 |
if (conf_parser_ctx.pass == 2) |
if (conf_parser_ctx.pass == 2) |
2280 |
SetConfTopicBurst(yy_aconf); |
SetConfTopicBurst(yy_aconf); |
2281 |
|
} | T_SSL |
2282 |
|
{ |
2283 |
|
if (conf_parser_ctx.pass == 2) |
2284 |
|
SetConfSSL(yy_aconf); |
2285 |
}; |
}; |
2286 |
|
|
2287 |
connect_encrypted: ENCRYPTED '=' TBOOL ';' |
connect_encrypted: ENCRYPTED '=' TBOOL ';' |