Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CROW_ENABLE_SSL not effective #414

Closed
alex-lt-kong opened this issue Feb 20, 2023 · 0 comments
Closed

CROW_ENABLE_SSL not effective #414

alex-lt-kong opened this issue Feb 20, 2023 · 0 comments

Comments

@alex-lt-kong
Copy link

alex-lt-kong commented Feb 20, 2023

I would like to enable the SSL support so that I build crow with:

cmake ../ -DCROW_ENABLE_SSL=ON
make -j2
make install

Then my PoC code is the following:

#include "crow.h"

int main()
{
    crow::SimpleApp app;

    CROW_ROUTE(app, "/")([](){
        return "Hello world";
    });

    app.port(18080).ssl_file("test.crt", "test.key").run();
}

However, it doesn't work, g++ complains:

/usr/local/include/crow/app.h: In instantiation of ‘crow::Crow<Middlewares>::self_t& crow::Crow<Middlewares>::ssl_file(T&&, Remain&& ...) [with T = const char (&)[56]; Remain = {const char (&)[56]}; Middlewares = {}; self_t = crow::Crow<>]’:
./src/odcs.cpp:17:29:   required from here
/usr/local/include/crow/app.h:386:41: error: static assertion failed: Define CROW_ENABLE_SSL to enable ssl support.
  386 |               std::is_base_of<T, void>::value,

Is this normal or a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant