mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-22 18:51:48 +02:00
Enable TLS 1.1 and 1.2
This commit is contained in:
parent
36deba3a75
commit
a27744bca6
@ -161,12 +161,14 @@ ws_ctx_t *ws_socket_ssl(ws_ctx_t *ctx, int socket, char * certfile, char * keyfi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->ssl_ctx = SSL_CTX_new(TLSv1_server_method());
|
ctx->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
|
||||||
if (ctx->ssl_ctx == NULL) {
|
if (ctx->ssl_ctx == NULL) {
|
||||||
ERR_print_errors_fp(stderr);
|
ERR_print_errors_fp(stderr);
|
||||||
fatal("Failed to configure SSL context");
|
fatal("Failed to configure SSL context");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSL_CTX_set_options(ctx->ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
|
||||||
|
|
||||||
if (SSL_CTX_use_PrivateKey_file(ctx->ssl_ctx, use_keyfile,
|
if (SSL_CTX_use_PrivateKey_file(ctx->ssl_ctx, use_keyfile,
|
||||||
SSL_FILETYPE_PEM) <= 0) {
|
SSL_FILETYPE_PEM) <= 0) {
|
||||||
sprintf(msg, "Unable to load private key file %s\n", use_keyfile);
|
sprintf(msg, "Unable to load private key file %s\n", use_keyfile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user