[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Simpe https server code in c



> Does any of you know any simple https server code in c in open source?  Please let me know.

Hi!

There is http-server [1] and https-client [2]
But it is pretty easy to add https support to the http-server, you can
take a look at the following sample [3] in tests.

  [1]: https://github.com/libevent/libevent/blob/master/sample/http-server.c
  [2]: https://github.com/libevent/libevent/blob/master/sample/https-client.c
  [3]: https://github.com/libevent/libevent/blob/master/test/regress_http.c#L167

In a nut shell all you need is set the callback for bufferevent
creation to use bufferevent_openssl_socket_new() (and create ssl
stuff), and create certificate for the server.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.