Merge pull request #30019 from Faless/tls/stream_check

Add NULL check in SSL connect_to_stream
This commit is contained in:
Fabio Alessandrelli 2019-06-24 08:32:01 +01:00 committed by GitHub
commit 131a4b14fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,8 @@ Error StreamPeerMbedTLS::_do_handshake() {
Error StreamPeerMbedTLS::connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs, const String &p_for_hostname) {
ERR_FAIL_COND_V(p_base.is_null(), ERR_INVALID_PARAMETER);
base = p_base;
int ret = 0;
int authmode = p_validate_certs ? MBEDTLS_SSL_VERIFY_REQUIRED : MBEDTLS_SSL_VERIFY_NONE;