Processing of vendor specific TLS messages introduced

This commit is contained in:
2016-08-13 18:48:02 +02:00
parent c749753c68
commit eb918f3141
2 changed files with 32 additions and 2 deletions

View File

@@ -906,7 +906,7 @@ void eap::method_tls::process_packet(_In_bytecount_(size_pck) const void *_pck,
process_handshake(msg, msg_end - msg);
break;
case tls_message_type_application_data:
case tls_message_type_application_data: {
if (!m_cipher_spec)
throw win_runtime_error(EAP_E_EAPHOST_METHOD_INVALID_PACKET, __FUNCTION__ " Application data should be encrypted.");
@@ -915,6 +915,15 @@ void eap::method_tls::process_packet(_In_bytecount_(size_pck) const void *_pck,
process_application_data(msg_dec.data(), msg_dec.size());
break;
}
default:
if (m_cipher_spec) {
sanitizing_blob msg_dec(msg, msg_end);
decrypt_message(msg_dec);
process_vendor_data(hdr->type, msg_dec.data(), msg_dec.size());
} else
process_vendor_data(hdr->type, msg, msg_end - msg);
}
}
pck = msg_end;
@@ -1095,6 +1104,16 @@ void eap::method_tls::process_application_data(_In_bytecount_(msg_size) const vo
{
UNREFERENCED_PARAMETER(msg);
UNREFERENCED_PARAMETER(msg_size);
// TODO: Parse application data (Diameter AVP)
}
void eap::method_tls::process_vendor_data(_In_ unsigned char type, _In_bytecount_(msg_size) const void *msg, _In_ size_t msg_size)
{
UNREFERENCED_PARAMETER(type);
UNREFERENCED_PARAMETER(msg);
UNREFERENCED_PARAMETER(msg_size);
}