davidmoreno / onion

C library to create simple HTTP servers and Web Applications.
http://www.coralbits.com/libonion/
Other
2.02k stars 250 forks source link

OpenSSL support #213

Open xest opened 7 years ago

xest commented 7 years ago

Add ONION_USE_OPENSSL option to use OpenSSL instead of GnuTLS and GCrypt(default: false). Tested on Ubuntu 16.10, OpenSSL 1.0.2g.

davidmoreno commented 7 years ago

Hi! Thanks a lot for the patch, but although it makes the trick, I dont like too much that it actually do a half wrapper for openssl using gnutls functions (particularly the use of the headers with the defines). It hides whats really going on.

I would prefer a openssl.c and a gnutls.c that implement the basic functions (basically whats on the defines and the extra headers), and make https.c call the proper implementation.

xest commented 7 years ago

Hi! I know what you said. Actually I added random-openssl.c and https-openssl.c at first, but the differences between GnuTLS version and OpenSSL version were not too much. But if you don't like this way, I'll do it again a few weeks after.