diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-08-30 16:00:06 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2017-08-30 16:00:06 +0200 |
commit | 84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7 (patch) | |
tree | aa1648c2ba260b8576673677435481d371eec7b0 /src/PolarSSL++/CallbackSslContext.cpp | |
parent | Update core plugins to latest version (#3951) (diff) | |
download | cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar.gz cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar.bz2 cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar.lz cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar.xz cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.tar.zst cuberite-84941bcc9f25cbe3fd3b2604080d0a1cfd8fbaa7.zip |
Diffstat (limited to 'src/PolarSSL++/CallbackSslContext.cpp')
-rw-r--r-- | src/PolarSSL++/CallbackSslContext.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/src/PolarSSL++/CallbackSslContext.cpp b/src/PolarSSL++/CallbackSslContext.cpp deleted file mode 100644 index e061e3f03..000000000 --- a/src/PolarSSL++/CallbackSslContext.cpp +++ /dev/null @@ -1,60 +0,0 @@ - -// CallbackSslContext.cpp - -// Declares the cCallbackSslContext class representing a SSL context wrapper that uses callbacks to read and write SSL peer data - -#include "Globals.h" -#include "CallbackSslContext.h" - - - - - - -cCallbackSslContext::cCallbackSslContext(void) : - m_Callbacks(nullptr) -{ - // Nothing needed, but the constructor needs to exist so -} - - - - - -cCallbackSslContext::cCallbackSslContext(cCallbackSslContext::cDataCallbacks & a_Callbacks) : - m_Callbacks(&a_Callbacks) -{ -} - - - - - -int cCallbackSslContext::ReceiveEncrypted(unsigned char * a_Buffer, size_t a_NumBytes) -{ - if (m_Callbacks == nullptr) - { - LOGWARNING("SSL: Trying to receive data with no callbacks, aborting."); - return POLARSSL_ERR_NET_RECV_FAILED; - } - return m_Callbacks->ReceiveEncrypted(a_Buffer, a_NumBytes); -} - - - - - -int cCallbackSslContext::SendEncrypted(const unsigned char * a_Buffer, size_t a_NumBytes) -{ - if (m_Callbacks == nullptr) - { - LOGWARNING("SSL: Trying to send data with no callbacks, aborting."); - return POLARSSL_ERR_NET_SEND_FAILED; - } - return m_Callbacks->SendEncrypted(a_Buffer, a_NumBytes); -} - - - - - |