Commit Graph

39 Commits

Author SHA1 Message Date
6c205b983e (openssl tls) when OpenSSL is older than 1.1, register the crypto locking callback to be thread safe. Should fix lots of CI failures 2020-05-06 16:26:30 -07:00
2802cad8c4 more tls in memory certs doc + bump file format 2020-04-24 15:50:39 -07:00
9f770b10c0 clang-format 2020-04-24 15:34:00 -07:00
677f79b0ea Implement API for adding custom roots via a string (#178)
* Implement API for adding custom roots via a string. SocketTLSOptions API design needs work, but the IXSocketOpenSSL implementation feels good to me.

* Improve API design for specifying roots from memory.

* Add in-memory root CAs mbedtls implementation.

* Fix bug in newer versions of OpenSSL with in-memory certificate handling.
2020-04-24 15:32:11 -07:00
c70f1d09a8 include all ssl backends inside special per backend macro 2020-04-24 12:47:47 -07:00
f9d75c9374 (windows) when using OpenSSL, the system store is used to populate the cacert. No need to ship a cacert.pem file with your app. 2020-04-04 18:33:01 -07:00
5ce846f48b indent files 2020-03-20 17:00:18 -07:00
1d6373335c (websocket+tls) fix hang in tls handshake which could lead to ANR, discovered through unittesting. 2020-03-20 16:57:27 -07:00
90df3d1805 (openssl tls backend) Fix a hand in OpenSSL when using TLS v1.3 ... by disabling TLS v1.3 2020-03-12 16:27:25 -07:00
4f3f1f3e4c simplify socket interface 2020-01-12 22:30:16 -08:00
d2c5ab1cc4 (openssl + mbedssl) fix #140, can send large files with ws send over ssl / still broken with apple ssl 2020-01-12 11:08:44 -08:00
b816f1fbda Allow custom OpenSSL lib, only include openssl/x509v3.h when used. (#143)
* Allow custom OpenSSL lib, only include openssl/x509v3.h when used.

Using fnmatch on Unix systems, PathMatchSpecA is the best WINAPI equivalent.

* Moved shlwapi into WIN32 block.
2020-01-08 13:57:57 -08:00
128545cc2b OpenSSL: add an extra cipher to the default cipher set, which let us connect to wss//echo.websocket.org 2019-10-10 09:37:27 -07:00
a0cfaff528 Implement SSL server with OpenSSL backend / still flaky 2019-10-01 15:43:37 -07:00
e5c8e2e7f4 openSSLHandshake -> openSSLClientHandshake 2019-09-30 21:24:25 -07:00
7a26ff4de8 clang-format 2019-09-30 17:52:39 -07:00
55141aa875 ws curl + http client tls option handling + ca cert processing for mbedtls 2019-09-29 21:13:11 -07:00
4e4792d6dc update copyright dates and authors 2019-09-29 20:09:51 -07:00
2aca019d84 openssl client: handle TLS options 2019-09-29 20:07:53 -07:00
cd3c9d879c reformat everything with clang-format 2019-09-23 10:25:23 -07:00
6f76fea188 compile fixes 2019-09-22 18:52:57 -07:00
041fa3e340 compiled fixes on mac and windows 2019-09-22 18:43:57 -07:00
408ee41990 WIP: support configurable certificates/keys, and root trust CAs (#114)
* wip: tls options implemented in openssl

* update naming, remove #define guard

* assert compiled with USE_TLS for tls options

* apply autoformatter

* include tls options impl

* style cleanup; auto ssl_err

* ssl_err -> sslErr

* be explicit about SSL_VERIFY_NONE
2019-09-22 18:06:15 -07:00
06cbebe22e Feature/mbedtls (#84)
* try to import mbedtls and build it

* add stubs socket class

* some boilterplate, read and write function implemented

* more boilterplate / current error in handshake because no CA cert is setup

* add something so skip ca verification, can ws curl https://google.com !

* cleanup / close implemented

* tweak CMakefiles

* typo in include

* update readme

* disable unittests
2019-06-01 17:41:48 -07:00
93b901a286 remove more iostream includes (#65) 2019-05-11 11:27:58 -07:00
cce759b8dd fix Linux cast warning 2019-04-19 15:03:49 -07:00
eac611ab1e Feature/connection state (#25)
* (cmake) add a warning about 32/64 conversion problems.

* fix typo

* New connection state for server code + fix OpenSSL double init bug

* update README
2019-03-20 18:34:24 -07:00
932bb732e0 Feature/send large message (#14)
* introduce send fragment

* can pass a fin frame

* can send messages which are a perfect multiple of the chunk size

* set fin only for last fragment

* cleanup

* last fragment should be of type CONTINUATION

* Add simple send and receive programs

* speedups receiving + better way to wait for thing

* receive speedup by using linked list of chunks instead of large array

* document bug

* use chunks to receive data

* trailing spaces
2019-02-20 18:59:07 -08:00
0fd06bb592 int -> ssize_t for socker recv and send 2019-01-05 20:53:50 -08:00
e892b21872 openssl cleanup 2019-01-05 11:42:25 -08:00
ea07afcc0b can create a socket from a fd 2018-12-29 21:53:33 -08:00
cbadecab33 non blocking dns lookup 2018-12-14 16:28:17 -08:00
8c079787f0 add cancellation support while connecting, to speed up WebSocket::stop 2018-12-09 17:56:20 -08:00
62528e6a0b http upgrade and connections use non blocking sockets 2018-12-09 14:07:40 -08:00
cf0045a483 stopping connection on Linux does not close the socket, which can create problem when re-starting the connection 2018-11-01 17:02:49 -07:00
436bf8deb5 more ssl peer validation stuff 2018-10-05 18:45:44 -07:00
10ce046b0f (openssl) verify that the certificate we are getting match the domain we are requesting 2018-10-05 12:08:45 -07:00
8f5d83c5c2 (openssl) add sni support 2018-10-01 17:36:21 -07:00
9b8d6cedfe First import 2018-09-27 14:57:19 -07:00