EAP-TTLS work continues...
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
#if !defined(RC_INVOKED) && !defined(MIDL_PASS)
|
||||
|
||||
#include <WinStd/Common.h>
|
||||
#include <WinStd/Crypt.h>
|
||||
#include <WinStd/EAP.h>
|
||||
|
||||
@@ -48,6 +49,11 @@ namespace eap
|
||||
/// Input BLOB cursor
|
||||
///
|
||||
struct cursor_in;
|
||||
|
||||
///
|
||||
/// Sanitizing dynamically allocated BLOB
|
||||
///
|
||||
typedef std::vector<unsigned char, winstd::sanitizing_allocator<unsigned char> > sanitizing_blob;
|
||||
}
|
||||
|
||||
///
|
||||
@@ -329,6 +335,17 @@ inline size_t pksizeof(const winstd::eap_type_t &val);
|
||||
///
|
||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::eap_type_t &val);
|
||||
|
||||
#ifndef htonll
|
||||
///
|
||||
/// Convert host converts an unsigned __int64 from host to TCP/IP network byte order.
|
||||
///
|
||||
/// \param[in] val A 64-bit unsigned number in host byte order.
|
||||
///
|
||||
/// \returns The value in TCP/IP's network byte order.
|
||||
///
|
||||
inline unsigned __int64 htonll(unsigned __int64 val);
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -684,4 +701,16 @@ inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ winstd::eap_type_t
|
||||
val = (winstd::eap_type_t)t;
|
||||
}
|
||||
|
||||
|
||||
#ifndef htonll
|
||||
|
||||
inline unsigned __int64 htonll(unsigned __int64 val)
|
||||
{
|
||||
return
|
||||
(unsigned __int64)htonl((u_long)((val >> 32) & 0xffffffff)) |
|
||||
(unsigned __int64)htonl((u_long)((val ) & 0xffffffff)) << 32;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -90,6 +90,33 @@ namespace eap
|
||||
/// \name Packet processing
|
||||
/// @{
|
||||
|
||||
///
|
||||
/// Starts an EAP authentication session on the peer EAPHost using the EAP method.
|
||||
///
|
||||
/// \sa [EapPeerBeginSession function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363600.aspx)
|
||||
///
|
||||
/// \returns
|
||||
/// - \c true if succeeded
|
||||
/// - \c false otherwise. See \p ppEapError for details.
|
||||
///
|
||||
virtual bool begin_session(
|
||||
_In_ DWORD dwFlags,
|
||||
_In_ const EapAttributes *pAttributeArray,
|
||||
_In_ HANDLE hTokenImpersonateUser,
|
||||
_In_ DWORD dwMaxSendPacketSize,
|
||||
_Out_ EAP_ERROR **ppEapError);
|
||||
|
||||
///
|
||||
/// Ends an EAP authentication session for the EAP method.
|
||||
///
|
||||
/// \sa [EapPeerEndSession function](https://msdn.microsoft.com/en-us/library/windows/desktop/aa363604.aspx)
|
||||
///
|
||||
/// \returns
|
||||
/// - \c true if succeeded
|
||||
/// - \c false otherwise. See \p ppEapError for details.
|
||||
///
|
||||
virtual bool end_session(_Out_ EAP_ERROR **ppEapError);
|
||||
|
||||
///
|
||||
/// Processes a packet received by EAPHost from a supplicant.
|
||||
///
|
||||
|
@@ -835,7 +835,7 @@ namespace eap
|
||||
///
|
||||
virtual bool begin_session(
|
||||
_In_ DWORD dwFlags,
|
||||
_In_ const EapAttributes *pAttributeArray,
|
||||
_In_ const EapAttributes *pAttributeArray,
|
||||
_In_ HANDLE hTokenImpersonateUser,
|
||||
_In_count_(dwConnectionDataSize) const BYTE *pConnectionData,
|
||||
_In_ DWORD dwConnectionDataSize,
|
||||
|
@@ -74,3 +74,28 @@ eap::method& eap::method::operator=(_Inout_ method &&other)
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
bool eap::method::begin_session(
|
||||
_In_ DWORD dwFlags,
|
||||
_In_ const EapAttributes *pAttributeArray,
|
||||
_In_ HANDLE hTokenImpersonateUser,
|
||||
_In_ DWORD dwMaxSendPacketSize,
|
||||
_Out_ EAP_ERROR **ppEapError)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(dwFlags);
|
||||
UNREFERENCED_PARAMETER(pAttributeArray);
|
||||
UNREFERENCED_PARAMETER(hTokenImpersonateUser);
|
||||
UNREFERENCED_PARAMETER(dwMaxSendPacketSize);
|
||||
UNREFERENCED_PARAMETER(ppEapError);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool eap::method::end_session(_Out_ EAP_ERROR **ppEapError)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ppEapError);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user