output TLS-independent error messages
This commit is contained in:
@@ -52,8 +52,8 @@ METHOD(tls_reader_t, read_uint8, bool,
|
|||||||
{
|
{
|
||||||
if (this->buf.len < 1)
|
if (this->buf.len < 1)
|
||||||
{
|
{
|
||||||
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
|
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int8 data",
|
||||||
this->buf.len, 8);
|
this->buf.len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*res = this->buf.ptr[0];
|
*res = this->buf.ptr[0];
|
||||||
@@ -66,8 +66,8 @@ METHOD(tls_reader_t, read_uint16, bool,
|
|||||||
{
|
{
|
||||||
if (this->buf.len < 2)
|
if (this->buf.len < 2)
|
||||||
{
|
{
|
||||||
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
|
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int16 data",
|
||||||
this->buf.len, 16);
|
this->buf.len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*res = untoh16(this->buf.ptr);
|
*res = untoh16(this->buf.ptr);
|
||||||
@@ -80,8 +80,8 @@ METHOD(tls_reader_t, read_uint24, bool,
|
|||||||
{
|
{
|
||||||
if (this->buf.len < 3)
|
if (this->buf.len < 3)
|
||||||
{
|
{
|
||||||
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
|
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int24 data",
|
||||||
this->buf.len, 24);
|
this->buf.len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*res = untoh32(this->buf.ptr) >> 8;
|
*res = untoh32(this->buf.ptr) >> 8;
|
||||||
@@ -94,8 +94,8 @@ METHOD(tls_reader_t, read_uint32, bool,
|
|||||||
{
|
{
|
||||||
if (this->buf.len < 4)
|
if (this->buf.len < 4)
|
||||||
{
|
{
|
||||||
DBG1(DBG_TLS, "%d bytes insufficient to parse uint%d TLS data",
|
DBG1(DBG_TLS, "%d bytes insufficient to parse u_int32 data",
|
||||||
this->buf.len, 32);
|
this->buf.len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*res = untoh32(this->buf.ptr);
|
*res = untoh32(this->buf.ptr);
|
||||||
@@ -108,7 +108,7 @@ METHOD(tls_reader_t, read_data, bool,
|
|||||||
{
|
{
|
||||||
if (this->buf.len < len)
|
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);
|
this->buf.len, len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user