kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit b20d26e8394798db91978767799c9c1afe6e2a87
parent feb90208ef01faa1e585b938614d006b5c9988d4
Author: Joris Vink <joris@coders.se>
Date:   Fri, 18 Feb 2022 09:17:58 +0100

Throw exception is TLS backend isnt supported.

Diffstat:
src/python.c | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -1895,6 +1895,13 @@ python_kore_server(PyObject *self, PyObject *args, PyObject *kwargs) srv = kore_server_create(name); python_bool_from_dict(kwargs, "tls", &srv->tls); + if (srv->tls && !kore_tls_supported()) { + kore_server_free(srv); + PyErr_SetString(PyExc_RuntimeError, + "TLS not supported in this Kore build"); + return (NULL); + } + if (ip != NULL) { if ((port = python_string_from_dict(kwargs, "port")) == NULL) { kore_server_free(srv);