output TLS-independent error messages

This commit is contained in:
Andreas Steffen
2010-12-05 14:55:18 +01:00
parent 13a7f5f3e3
commit 58d73d38bc
+9 -9
View File
@@ -52,8 +52,8 @@ METHOD(tls_reader_t, read_uint8, bool,
{
if (this->buf.len < 1)
{
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
this->buf.len, 8);
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int8 data",
this->buf.len);
return FALSE;
}
*res = this->buf.ptr[0];
@@ -66,8 +66,8 @@ METHOD(tls_reader_t, read_uint16, bool,
{
if (this->buf.len < 2)
{
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
this->buf.len, 16);
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int16 data",
this->buf.len);
return FALSE;
}
*res = untoh16(this->buf.ptr);
@@ -80,8 +80,8 @@ METHOD(tls_reader_t, read_uint24, bool,
{
if (this->buf.len < 3)
{
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
this->buf.len, 24);
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int24 data",
this->buf.len);
return FALSE;
}
*res = untoh32(this->buf.ptr) >> 8;
@@ -94,8 +94,8 @@ METHOD(tls_reader_t, read_uint32, bool,
{
if (this->buf.len < 4)
{
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
this->buf.len, 32);
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int32 data",
this->buf.len);
return FALSE;
}
*res = untoh32(this->buf.ptr);
@@ -108,7 +108,7 @@ METHOD(tls_reader_t, read_data, bool,
{
if (this->buf.len < len)
{
DBG1(DBG_TLS, "%d bytes insufficient to parse %d bytes TLS data",
DBG1(DBG_TLS, "%d bytes insufficient to parse %d bytes of data",
this->buf.len, len);
return FALSE;
}