summaryrefslogtreecommitdiffstats
path: root/src/mbedTLS++
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbedTLS++')
-rw-r--r--src/mbedTLS++/BlockingSslClientSocket.cpp2
-rw-r--r--src/mbedTLS++/CryptoKey.cpp4
-rw-r--r--src/mbedTLS++/CtrDrbgContext.cpp2
-rw-r--r--src/mbedTLS++/SslContext.cpp4
-rw-r--r--src/mbedTLS++/SslContext.h4
-rw-r--r--src/mbedTLS++/X509Cert.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/mbedTLS++/BlockingSslClientSocket.cpp b/src/mbedTLS++/BlockingSslClientSocket.cpp
index 9267975cb..e8f616258 100644
--- a/src/mbedTLS++/BlockingSslClientSocket.cpp
+++ b/src/mbedTLS++/BlockingSslClientSocket.cpp
@@ -208,7 +208,7 @@ bool cBlockingSslClientSocket::Send(const void * a_Data, size_t a_NumBytes)
}
// Keep sending the data until all of it is sent:
- const char * Data = reinterpret_cast<const char *>(a_Data);
+ const char * Data = static_cast<const char *>(a_Data);
size_t NumBytes = a_NumBytes;
for (;;)
{
diff --git a/src/mbedTLS++/CryptoKey.cpp b/src/mbedTLS++/CryptoKey.cpp
index 6615991d6..b0c0da167 100644
--- a/src/mbedTLS++/CryptoKey.cpp
+++ b/src/mbedTLS++/CryptoKey.cpp
@@ -109,7 +109,7 @@ int cCryptoKey::ParsePublic(const void * a_Data, size_t a_NumBytes)
{
ASSERT(!IsValid()); // Cannot parse a second key
- return mbedtls_pk_parse_public_key(&m_Pk, reinterpret_cast<const unsigned char *>(a_Data), a_NumBytes);
+ return mbedtls_pk_parse_public_key(&m_Pk, static_cast<const unsigned char *>(a_Data), a_NumBytes);
}
@@ -122,7 +122,7 @@ int cCryptoKey::ParsePrivate(const void * a_Data, size_t a_NumBytes, const AStri
ASSERT(!IsValid()); // Cannot parse a second key
// mbedTLS requires that PEM-encoded data is passed including the terminating NUL byte,
// and DER-encoded data is decoded properly even with an extra trailing NUL byte, so we simply add one to everything:
- AString keyData(reinterpret_cast<const char *>(a_Data), a_NumBytes);
+ AString keyData(static_cast<const char *>(a_Data), a_NumBytes);
if (a_Password.empty())
{
diff --git a/src/mbedTLS++/CtrDrbgContext.cpp b/src/mbedTLS++/CtrDrbgContext.cpp
index a2b9ee2dc..07f57001d 100644
--- a/src/mbedTLS++/CtrDrbgContext.cpp
+++ b/src/mbedTLS++/CtrDrbgContext.cpp
@@ -41,7 +41,7 @@ int cCtrDrbgContext::Initialize(const void * a_Custom, size_t a_CustomSize)
return 0;
}
- int res = mbedtls_ctr_drbg_seed(&m_CtrDrbg, mbedtls_entropy_func, &(m_EntropyContext->m_Entropy), reinterpret_cast<const unsigned char *>(a_Custom), a_CustomSize);
+ int res = mbedtls_ctr_drbg_seed(&m_CtrDrbg, mbedtls_entropy_func, &(m_EntropyContext->m_Entropy), static_cast<const unsigned char *>(a_Custom), a_CustomSize);
m_IsValid = (res == 0);
return res;
}
diff --git a/src/mbedTLS++/SslContext.cpp b/src/mbedTLS++/SslContext.cpp
index 679362c7a..d5b8525a6 100644
--- a/src/mbedTLS++/SslContext.cpp
+++ b/src/mbedTLS++/SslContext.cpp
@@ -104,7 +104,7 @@ int cSslContext::WritePlain(const void * a_Data, size_t a_NumBytes)
}
}
- return mbedtls_ssl_write(&m_Ssl, reinterpret_cast<const unsigned char *>(a_Data), a_NumBytes);
+ return mbedtls_ssl_write(&m_Ssl, static_cast<const unsigned char *>(a_Data), a_NumBytes);
}
@@ -123,7 +123,7 @@ int cSslContext::ReadPlain(void * a_Data, size_t a_MaxBytes)
}
}
- return mbedtls_ssl_read(&m_Ssl, reinterpret_cast<unsigned char *>(a_Data), a_MaxBytes);
+ return mbedtls_ssl_read(&m_Ssl, static_cast<unsigned char *>(a_Data), a_MaxBytes);
}
diff --git a/src/mbedTLS++/SslContext.h b/src/mbedTLS++/SslContext.h
index d015b6587..033749bf3 100644
--- a/src/mbedTLS++/SslContext.h
+++ b/src/mbedTLS++/SslContext.h
@@ -103,13 +103,13 @@ protected:
/** The callback used by mbedTLS when it wants to read encrypted data. */
static int ReceiveEncrypted(void * a_This, unsigned char * a_Buffer, size_t a_NumBytes)
{
- return (reinterpret_cast<cSslContext *>(a_This))->ReceiveEncrypted(a_Buffer, a_NumBytes);
+ return (static_cast<cSslContext *>(a_This))->ReceiveEncrypted(a_Buffer, a_NumBytes);
}
/** The callback used by mbedTLS when it wants to write encrypted data. */
static int SendEncrypted(void * a_This, const unsigned char * a_Buffer, size_t a_NumBytes)
{
- return (reinterpret_cast<cSslContext *>(a_This))->SendEncrypted(a_Buffer, a_NumBytes);
+ return (static_cast<cSslContext *>(a_This))->SendEncrypted(a_Buffer, a_NumBytes);
}
/** Called when mbedTLS wants to read encrypted data. */
diff --git a/src/mbedTLS++/X509Cert.cpp b/src/mbedTLS++/X509Cert.cpp
index 7bcfec415..e7484af3b 100644
--- a/src/mbedTLS++/X509Cert.cpp
+++ b/src/mbedTLS++/X509Cert.cpp
@@ -32,7 +32,7 @@ int cX509Cert::Parse(const void * a_CertContents, size_t a_Size)
{
// mbedTLS requires that PEM-encoded data is passed including the terminating NUL byte,
// and DER-encoded data is decoded properly even with an extra trailing NUL byte, so we simply add one to everything:
- AString certContents(reinterpret_cast<const char *>(a_CertContents), a_Size);
+ AString certContents(static_cast<const char *>(a_CertContents), a_Size);
return mbedtls_x509_crt_parse(&m_Cert, reinterpret_cast<const unsigned char *>(certContents.data()), a_Size + 1);
}