1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Subject: [PATCH] Fix error handling when calling "REQUIRES PRIVATE KEY"

callback.

A recent patch in ssl.c introduced a callback for setting the
private key of the SSL context. This code contained a bug, which
resulted in lws_context_init_server_ssl() returning always
with a return value of 1, indicating an error.

This patch introduces the missing curly braces to fix the code's
intended behaviour.
This commit is contained in:
=?UTF-8?q?Christoph=20M=C3=BCllner?= 2015-01-24 15:55:17 +01:00 committed by Andy Green
parent 976d9ebbe8
commit 87840d18e6

View file

@ -208,9 +208,10 @@ lws_context_init_server_ssl(struct lws_context_creation_info *info,
else {
if (context->protocols[0].callback(context, NULL,
LWS_CALLBACK_OPENSSL_CONTEXT_REQUIRES_PRIVATE_KEY,
context->ssl_ctx, NULL, 0))
context->ssl_ctx, NULL, 0)) {
lwsl_err("ssl private key not set\n");
return 1;
}
}
/* verify private key */