diff options
author | Lyuma <xn.lyuma@gmail.com> | 2022-05-23 15:07:44 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2022-05-25 12:43:19 -0700 |
commit | 7e283859483db79d7f7b027f5607622e78d07c5b (patch) | |
tree | bd3539311039856a6a8a8fb0ffcb878e7877ebd9 /modules | |
parent | 99911bfa7929227783b7ae5cfe5b1dc28676956b (diff) |
Add StreamPeerSSL.get_stream() accessor.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mbedtls/stream_peer_mbedtls.cpp | 4 | ||||
-rw-r--r-- | modules/mbedtls/stream_peer_mbedtls.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/mbedtls/stream_peer_mbedtls.cpp b/modules/mbedtls/stream_peer_mbedtls.cpp index 1818048877..92590fbcf6 100644 --- a/modules/mbedtls/stream_peer_mbedtls.cpp +++ b/modules/mbedtls/stream_peer_mbedtls.cpp @@ -298,6 +298,10 @@ StreamPeerMbedTLS::Status StreamPeerMbedTLS::get_status() const { return status; } +Ref<StreamPeer> StreamPeerMbedTLS::get_stream() const { + return base; +} + StreamPeerSSL *StreamPeerMbedTLS::_create_func() { return memnew(StreamPeerMbedTLS); } diff --git a/modules/mbedtls/stream_peer_mbedtls.h b/modules/mbedtls/stream_peer_mbedtls.h index 98b91e65ab..7660410e04 100644 --- a/modules/mbedtls/stream_peer_mbedtls.h +++ b/modules/mbedtls/stream_peer_mbedtls.h @@ -57,6 +57,7 @@ public: virtual Error accept_stream(Ref<StreamPeer> p_base, Ref<CryptoKey> p_key, Ref<X509Certificate> p_cert, Ref<X509Certificate> p_ca_chain = Ref<X509Certificate>()); virtual Error connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs = false, const String &p_for_hostname = String(), Ref<X509Certificate> p_valid_cert = Ref<X509Certificate>()); virtual Status get_status() const; + virtual Ref<StreamPeer> get_stream() const; virtual void disconnect_from_stream(); |