summaryrefslogtreecommitdiffstats
path: root/modules/mbedtls
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when passing invalid key to Crypto.Fabio Alessandrelli2019-10-091-0/+1
| | | | In generate_self_signed_certificate
* Added some obvious errors explanationsqarmin2019-09-251-7/+7
|
* Style: Fix copyright headers in new filesRémi Verschelde2019-08-284-4/+4
|
* Better error handling in SSLContext, CryptoFabio Alessandrelli2019-08-222-5/+8
|
* Fix StreamPeerSSL connect_to_stream w/ custom certFabio Alessandrelli2019-08-221-1/+1
| | | | | | Follow up on #29871. Was checking the wrong parameter, causing the code to ignore provided stream-specific SSL certificate.
* Fix regression in StreamPeerSSLFabio Alessandrelli2019-08-223-10/+4
| | | | | Validate that base stream is valid before accepting/connecting. Also remove unnecessary includes.
* Rewrite StreamPeerSSL with SSLContext helper classFabio Alessandrelli2019-08-215-80/+256
| | | | | | | connect_to_stream now accepts optional parameter to specify which certificates to trust. Implement accept_stream (SSL server) with key/cert parameters to specify the RSA key and X509 certificate resources.
* New CryptoMbedTLS Crypto implementation.Fabio Alessandrelli2019-08-213-1/+412
| | | | Allows random bytes, RSA keys, and X509 certificates generation.
* CryptoCore class to access to base crypto utils.Fabio Alessandrelli2019-07-022-3/+0
| | | | | | | | | | | | | | | | | | Godot core needs MD5/SHA256/AES/Base64 which used to be provided by separate libraries. Since we bundle mbedtls in most cases, and we can easily only include the needed sources if we so desire, let's use it. To simplify library changes in the future, and better isolate header dependencies all functions have been wrapped around inside a class in `core/math/crypto_base.h`. If the mbedtls module is disabled, we only bundle the needed source files independently of the `builtin_mbedtls` option. If the module is enabled, the `builtin_mbedtls` option works as usual. Also remove some unused headers from StreamPeerMbedTLS which were causing build issues.
* Add NULL check in SSL connect_to_streamFabio Alessandrelli2019-06-241-0/+2
|
* Small hack to avoid runtime error when using ubsanFabio Alessandrelli2019-02-201-1/+4
| | | | | | mbedtls_ssl_read cannot be called with a NULL buffer even if len is 0, as those are passed to memcpy and compilers doesn't like that. Always pass a single byte (still len 0 so nothing is actually copied)
* Fix typos with codespellRémi Verschelde2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | Using codespell 1.14.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang doubleclick lod nd numer que te unselect EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Update copyright statements to 2019Rémi Verschelde2019-01-014-8/+8
| | | | Happy new year to the wonderful Godot community!
* Fix missing/malformed license headersRémi Verschelde2019-01-012-2/+2
|
* SCons: Build thirdparty code in own env, disable warningsRémi Verschelde2018-09-281-1/+5
| | | | | Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
* Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]Rémi Verschelde2018-09-272-9/+11
| | | | | | | | | | | | | Fixes the following GCC 5 warnings and actual bugs: ``` drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare] modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] ```
* Add checks for clean disconnect in HTTP/TCP/SSL.Fabio Alessandrelli2018-09-211-3/+36
| | | | | Half-open TCP connection can, of course, only be detected by writing the socket, or waiting for TCP timeout.
* Allow system certs file to be used by Editor.Fabio Alessandrelli2018-09-151-5/+3
| | | | | | Note, it will only used by the Editor, not when running the game. This allows package maintainer to compile Godot to use system installed certificates when accessing the AssetLib.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-122-2/+2
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* mbedtls: Update to upstream version 2.12.0Rémi Verschelde2018-07-281-0/+5
| | | | | _WIN32_WINNT redefinition fix is no longer needed as it was merged upstream. PR 1453 is still not merged, diff updated to current state.
* Implement non blocking-handshake for StreamPeerSSLFabio Alessandrelli2018-07-162-30/+56
|
* Bump mbedTLS to version 2.10.0Fabio Alessandrelli2018-06-071-0/+2
|
* SCons: Pass env to modules can_build methodRémi Verschelde2018-05-301-1/+1
| | | | | | This allows to disable modules based on the environment, in particular `env[tools]` which tells us if we are building the editor or not.
* Generalize SSL cert reading from fileFabio Alessandrelli2018-04-032-24/+4
|
* Use Prepend instead of Append for mbedTLS includeFabio Alessandrelli2018-02-281-1/+1
| | | | Fixes build on FreeBSD when system-wide mbedTLS and/or openSSL are installed
* Allow building with system wide mbedtls on X11Fabio Alessandrelli2018-02-141-80/+80
| | | | | Using builtin_mbedtls=yes is still the default as many distributions do not ship with mbedtls included.
* Add mbedtls moduleFabio Alessandrelli2018-02-146-0/+592