aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/imap/IMAPConnection.cpp4
-rw-r--r--src/net/pop3/POP3Store.cpp4
-rw-r--r--src/net/smtp/SMTPTransport.cpp4
-rw-r--r--src/net/tls/TLSSocket.cpp2
-rw-r--r--src/security/cert/X509Certificate.cpp8
-rw-r--r--src/security/digest/md5/md5MessageDigest.cpp16
-rw-r--r--src/security/digest/messageDigest.cpp3
-rw-r--r--src/security/digest/sha1/sha1MessageDigest.cpp20
-rw-r--r--src/security/sasl/SASLContext.cpp6
-rw-r--r--src/security/sasl/SASLSession.cpp4
-rw-r--r--src/security/sasl/SASLSocket.cpp8
-rw-r--r--src/security/sasl/builtinSASLMechanism.cpp18
-rw-r--r--src/utility/stream.cpp2
13 files changed, 49 insertions, 50 deletions
diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp
index 9683b009..7f13cf48 100644
--- a/src/net/imap/IMAPConnection.cpp
+++ b/src/net/imap/IMAPConnection.cpp
@@ -370,10 +370,10 @@ void IMAPConnection::authenticateSASL()
continue;
}
- byte* challenge = 0;
+ byte_t* challenge = 0;
int challengeLen = 0;
- byte* resp = 0;
+ byte_t* resp = 0;
int respLen = 0;
try
diff --git a/src/net/pop3/POP3Store.cpp b/src/net/pop3/POP3Store.cpp
index 24e5b9c3..ba4a5254 100644
--- a/src/net/pop3/POP3Store.cpp
+++ b/src/net/pop3/POP3Store.cpp
@@ -454,10 +454,10 @@ void POP3Store::authenticateSASL()
}
case RESPONSE_READY:
{
- byte* challenge = 0;
+ byte_t* challenge = 0;
int challengeLen = 0;
- byte* resp = 0;
+ byte_t* resp = 0;
int respLen = 0;
try
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp
index 4ce19716..1b634151 100644
--- a/src/net/smtp/SMTPTransport.cpp
+++ b/src/net/smtp/SMTPTransport.cpp
@@ -355,10 +355,10 @@ void SMTPTransport::authenticateSASL()
}
case 334:
{
- byte* challenge = 0;
+ byte_t* challenge = 0;
int challengeLen = 0;
- byte* resp = 0;
+ byte_t* resp = 0;
int respLen = 0;
try
diff --git a/src/net/tls/TLSSocket.cpp b/src/net/tls/TLSSocket.cpp
index 9dd8b625..b1896844 100644
--- a/src/net/tls/TLSSocket.cpp
+++ b/src/net/tls/TLSSocket.cpp
@@ -319,7 +319,7 @@ ref <security::cert::certificateChain> TLSSocket::getPeerCertificates() const
gnutls_x509_crt_export(x509Certs[i],
GNUTLS_X509_FMT_DER, NULL, &dataSize);
- byte* data = new byte[dataSize];
+ byte_t* data = new byte_t[dataSize];
gnutls_x509_crt_export(x509Certs[i],
GNUTLS_X509_FMT_DER, data, &dataSize);
diff --git a/src/security/cert/X509Certificate.cpp b/src/security/cert/X509Certificate.cpp
index 2575ba5d..65de1093 100644
--- a/src/security/cert/X509Certificate.cpp
+++ b/src/security/cert/X509Certificate.cpp
@@ -92,12 +92,12 @@ ref <X509Certificate> X509Certificate::import(utility::inputStream& is)
// static
ref <X509Certificate> X509Certificate::import
- (const byte* data, const unsigned int length)
+ (const byte_t* data, const unsigned int length)
{
ref <X509Certificate> cert = vmime::create <X509Certificate>();
gnutls_datum buffer;
- buffer.data = const_cast <byte*>(data);
+ buffer.data = const_cast <byte_t*>(data);
buffer.size = length;
// Try DER format
@@ -126,7 +126,7 @@ void X509Certificate::write
gnutls_x509_crt_export(m_data->cert, fmt, NULL, &dataSize);
- byte* data = new byte[dataSize];
+ byte_t* data = new byte_t[dataSize];
gnutls_x509_crt_export(m_data->cert, fmt, data, &dataSize);
@@ -210,7 +210,7 @@ const byteArray X509Certificate::getFingerprint(const DigestAlgorithm algo) cons
gnutls_x509_crt_get_fingerprint
(m_data->cert, galgo, NULL, &bufferSize);
- byte* buffer = new byte[bufferSize];
+ byte_t* buffer = new byte_t[bufferSize];
if (gnutls_x509_crt_get_fingerprint
(m_data->cert, galgo, buffer, &bufferSize) == 0)
diff --git a/src/security/digest/md5/md5MessageDigest.cpp b/src/security/digest/md5/md5MessageDigest.cpp
index 852812f9..200af52e 100644
--- a/src/security/digest/md5/md5MessageDigest.cpp
+++ b/src/security/digest/md5/md5MessageDigest.cpp
@@ -117,7 +117,7 @@ static inline void swapUint32Array(vmime_uint32* buf, unsigned long words)
}
-void md5MessageDigest::update(const byte b)
+void md5MessageDigest::update(const byte_t b)
{
update(&b, 1);
}
@@ -125,18 +125,18 @@ void md5MessageDigest::update(const byte b)
void md5MessageDigest::update(const string& s)
{
- update(reinterpret_cast <const byte*>(s.data()), s.length());
+ update(reinterpret_cast <const byte_t*>(s.data()), s.length());
}
-void md5MessageDigest::update(const byte* data, const unsigned long offset,
+void md5MessageDigest::update(const byte_t* data, const unsigned long offset,
const unsigned long len)
{
update(data + offset, len);
}
-void md5MessageDigest::update(const byte* data, const unsigned long length)
+void md5MessageDigest::update(const byte_t* data, const unsigned long length)
{
const unsigned long avail = 64 - (m_byteCount & 0x3f);
unsigned long len = length;
@@ -175,14 +175,14 @@ void md5MessageDigest::finalize(const string& s)
}
-void md5MessageDigest::finalize(const byte* buffer, const unsigned long len)
+void md5MessageDigest::finalize(const byte_t* buffer, const unsigned long len)
{
update(buffer, len);
finalize();
}
-void md5MessageDigest::finalize(const byte* buffer,
+void md5MessageDigest::finalize(const byte_t* buffer,
const unsigned long offset, const unsigned long len)
{
update(buffer, offset, len);
@@ -333,9 +333,9 @@ const int md5MessageDigest::getDigestLength() const
}
-const byte* md5MessageDigest::getDigest() const
+const byte_t* md5MessageDigest::getDigest() const
{
- return reinterpret_cast <const byte*>(m_hash);
+ return reinterpret_cast <const byte_t*>(m_hash);
}
diff --git a/src/security/digest/messageDigest.cpp b/src/security/digest/messageDigest.cpp
index 1f86b94f..bba80023 100644
--- a/src/security/digest/messageDigest.cpp
+++ b/src/security/digest/messageDigest.cpp
@@ -33,7 +33,7 @@ namespace digest {
const string messageDigest::getHexDigest() const
{
- const byte* hash = getDigest();
+ const byte_t* hash = getDigest();
const int len = getDigestLength();
static const unsigned char hex[] = "0123456789abcdef";
@@ -47,7 +47,6 @@ const string messageDigest::getHexDigest() const
}
return oss.str();
-
}
diff --git a/src/security/digest/sha1/sha1MessageDigest.cpp b/src/security/digest/sha1/sha1MessageDigest.cpp
index f1726fd4..cd58f0c9 100644
--- a/src/security/digest/sha1/sha1MessageDigest.cpp
+++ b/src/security/digest/sha1/sha1MessageDigest.cpp
@@ -80,7 +80,7 @@ void sha1MessageDigest::init()
}
-void sha1MessageDigest::update(const byte b)
+void sha1MessageDigest::update(const byte_t b)
{
update(&b, 1);
}
@@ -88,18 +88,18 @@ void sha1MessageDigest::update(const byte b)
void sha1MessageDigest::update(const string& s)
{
- update(reinterpret_cast <const byte*>(s.data()), s.length());
+ update(reinterpret_cast <const byte_t*>(s.data()), s.length());
}
-void sha1MessageDigest::update(const byte* buffer, const unsigned long offset,
+void sha1MessageDigest::update(const byte_t* buffer, const unsigned long offset,
const unsigned long len)
{
update(buffer + offset, len);
}
-void sha1MessageDigest::update(const byte* buffer, const unsigned long len)
+void sha1MessageDigest::update(const byte_t* buffer, const unsigned long len)
{
unsigned int i, j;
@@ -142,10 +142,10 @@ void sha1MessageDigest::finalize()
>> ((3-(i & 3)) * 8) ) & 255); // Endian independent
}
- update(reinterpret_cast <const byte*>("\200"), 1);
+ update(reinterpret_cast <const byte_t*>("\200"), 1);
while ((m_count[0] & 504) != 448)
- update(reinterpret_cast <const byte*>("\0"), 1);
+ update(reinterpret_cast <const byte_t*>("\0"), 1);
update(finalcount, 8); // Should cause a transform()
@@ -167,18 +167,18 @@ void sha1MessageDigest::finalize()
void sha1MessageDigest::finalize(const string& s)
{
- finalize(reinterpret_cast <const byte*>(s.data()), s.length());
+ finalize(reinterpret_cast <const byte_t*>(s.data()), s.length());
}
-void sha1MessageDigest::finalize(const byte* buffer, const unsigned long len)
+void sha1MessageDigest::finalize(const byte_t* buffer, const unsigned long len)
{
update(buffer, len);
finalize();
}
-void sha1MessageDigest::finalize(const byte* buffer,
+void sha1MessageDigest::finalize(const byte_t* buffer,
const unsigned long offset, const unsigned long len)
{
finalize(buffer + offset, len);
@@ -252,7 +252,7 @@ const int sha1MessageDigest::getDigestLength() const
}
-const byte* sha1MessageDigest::getDigest() const
+const byte_t* sha1MessageDigest::getDigest() const
{
return m_digest;
}
diff --git a/src/security/sasl/SASLContext.cpp b/src/security/sasl/SASLContext.cpp
index cf7d94f6..a4e25feb 100644
--- a/src/security/sasl/SASLContext.cpp
+++ b/src/security/sasl/SASLContext.cpp
@@ -96,7 +96,7 @@ ref <SASLMechanism> SASLContext::suggestMechanism
}
-void SASLContext::decodeB64(const string& input, byte** output, int* outputLen)
+void SASLContext::decodeB64(const string& input, byte_t** output, int* outputLen)
{
string res;
@@ -107,7 +107,7 @@ void SASLContext::decodeB64(const string& input, byte** output, int* outputLen)
dec->decode(is, os);
- byte* out = new byte[res.length()];
+ byte_t* out = new byte_t[res.length()];
std::copy(res.begin(), res.end(), out);
@@ -116,7 +116,7 @@ void SASLContext::decodeB64(const string& input, byte** output, int* outputLen)
}
-const string SASLContext::encodeB64(const byte* input, const int inputLen)
+const string SASLContext::encodeB64(const byte_t* input, const int inputLen)
{
string res;
diff --git a/src/security/sasl/SASLSession.cpp b/src/security/sasl/SASLSession.cpp
index 64606d01..9e66baa0 100644
--- a/src/security/sasl/SASLSession.cpp
+++ b/src/security/sasl/SASLSession.cpp
@@ -93,8 +93,8 @@ ref <SASLContext> SASLSession::getContext()
const bool SASLSession::evaluateChallenge
- (const byte* challenge, const int challengeLen,
- byte** response, int* responseLen)
+ (const byte_t* challenge, const int challengeLen,
+ byte_t** response, int* responseLen)
{
return m_mech->step(thisRef().dynamicCast <SASLSession>(),
challenge, challengeLen, response, responseLen);
diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp
index 1d2caff1..b4d1794f 100644
--- a/src/security/sasl/SASLSocket.cpp
+++ b/src/security/sasl/SASLSocket.cpp
@@ -105,11 +105,11 @@ const int SASLSocket::receiveRaw(char* buffer, const int count)
const int n = m_wrapped->receiveRaw(buffer, count);
- byte* output = 0;
+ byte_t* output = 0;
int outputLen = 0;
m_session->getMechanism()->decode
- (m_session, reinterpret_cast <const byte*>(buffer), n,
+ (m_session, reinterpret_cast <const byte_t*>(buffer), n,
&output, &outputLen);
// If we can not copy all decoded data into the output buffer, put
@@ -143,11 +143,11 @@ void SASLSocket::send(const string& buffer)
void SASLSocket::sendRaw(const char* buffer, const int count)
{
- byte* output = 0;
+ byte_t* output = 0;
int outputLen = 0;
m_session->getMechanism()->encode
- (m_session, reinterpret_cast <const byte*>(buffer), count,
+ (m_session, reinterpret_cast <const byte_t*>(buffer), count,
&output, &outputLen);
try
diff --git a/src/security/sasl/builtinSASLMechanism.cpp b/src/security/sasl/builtinSASLMechanism.cpp
index 45eddfd5..84819742 100644
--- a/src/security/sasl/builtinSASLMechanism.cpp
+++ b/src/security/sasl/builtinSASLMechanism.cpp
@@ -57,8 +57,8 @@ const string builtinSASLMechanism::getName() const
const bool builtinSASLMechanism::step
- (ref <SASLSession> sess, const byte* challenge, const int challengeLen,
- byte** response, int* responseLen)
+ (ref <SASLSession> sess, const byte_t* challenge, const int challengeLen,
+ byte_t** response, int* responseLen)
{
char* output = 0;
size_t outputLen = 0;
@@ -69,7 +69,7 @@ const bool builtinSASLMechanism::step
if (result == GSASL_OK || result == GSASL_NEEDS_MORE)
{
- byte* res = new byte[outputLen];
+ byte_t* res = new byte_t[outputLen];
for (size_t i = 0 ; i < outputLen ; ++i)
res[i] = output[i];
@@ -115,8 +115,8 @@ const bool builtinSASLMechanism::isComplete() const
void builtinSASLMechanism::encode
- (ref <SASLSession> sess, const byte* input, const int inputLen,
- byte** output, int* outputLen)
+ (ref <SASLSession> sess, const byte_t* input, const int inputLen,
+ byte_t** output, int* outputLen)
{
char* coutput = 0;
size_t coutputLen = 0;
@@ -130,7 +130,7 @@ void builtinSASLMechanism::encode
try
{
- byte* res = new byte[coutputLen];
+ byte_t* res = new byte_t[coutputLen];
std::copy(coutput, coutput + coutputLen, res);
@@ -148,8 +148,8 @@ void builtinSASLMechanism::encode
void builtinSASLMechanism::decode
- (ref <SASLSession> sess, const byte* input, const int inputLen,
- byte** output, int* outputLen)
+ (ref <SASLSession> sess, const byte_t* input, const int inputLen,
+ byte_t** output, int* outputLen)
{
char* coutput = 0;
size_t coutputLen = 0;
@@ -163,7 +163,7 @@ void builtinSASLMechanism::decode
throw exceptions::sasl_exception("Decoding error.");
}
- byte* res = new byte[coutputLen];
+ byte_t* res = new byte_t[coutputLen];
std::copy(coutput, coutput + coutputLen, res);
diff --git a/src/utility/stream.cpp b/src/utility/stream.cpp
index 5a8e8989..ac219fbd 100644
--- a/src/utility/stream.cpp
+++ b/src/utility/stream.cpp
@@ -363,7 +363,7 @@ const stream::size_type inputStreamPointerAdapter::skip(const size_type count)
// inputStreamByteBufferAdapter
-inputStreamByteBufferAdapter::inputStreamByteBufferAdapter(const byte* buffer, const size_type length)
+inputStreamByteBufferAdapter::inputStreamByteBufferAdapter(const byte_t* buffer, const size_type length)
: m_buffer(buffer), m_length(length), m_pos(0)
{
}