Subject: [eap] EAP Module (Windows XP)

From: Petrasca Lucian-Marcel <[email-masked]>
Date: Thu, 18 Nov 2004 11:28:35 +0100

Hi

I'm trying to make an EAP module for Windows XP with EAP-TLS authentification. 
The Microsft EAP-API describes the communication between RAS and EAP module 
that is mostly done over the callback function EapMakeMessage. Based on the EAP 
sample from the Windows SDK i created first an own EAP module that only wrapps 
the modeule RASTLS.DLL. I placed tracing calls in all EAP functions to see how 
the function arguments are handled. The functionality is for the most part 
clear to me excepting one: the "work buffer" in function EapBegin and 
EapMakeMessage which Microsofts EAP-API doesn't say to much. The structure of 
this buffer is not specified by the API. In the heeader file Eap.h from the 
sample application of the SDK the structure are defined as following:

typedef struct _EAPCB 
{
    MYSTATE             EapState;
    DWORD               fFlags;
    BOOL                fAuthenticator;
    LPVOID              pWorkBuffer;
    CHAR                aszIdentity[ UNLEN + 1 ];
    DWORD               dwIdExpected;
    CHAR                aszPassword[ PWLEN + 1 ];
    DWORD               dwResult;
    DWORD               dwInitialPacketId;
    BYTE*               pDataFromInteractiveUI;
    BYTE                bRecvPacketId;          //Special Id for Wireless case 
                                                //because it does not 
retransmit packets
    DWORD               dwSizeOfDataFromInteractiveUI;
    PBYTE               pUIContext;
    RAS_AUTH_ATTRIBUTE* pUserAttributes;
    RAS_AUTH_ATTRIBUTE* pMPPEKeyAttributes;    // MPPE key

} EAPCB;

The callback functions are called with this order:

...
EapBegin
EapMakeMessage (TLS request identity -> TLS client hello)
EapMakeMessage (the rest of the TLS handshake)
...
EapMakeMessage (EAP success -> MPPE Keys)
EapEnd

In my own module there is only one call of EapMessage followed by an EapEnd. I 
have checked all parameters and my output parameters contains the same 
information as the rastls.dll provides excepting that work buffer. I'm not sure 
if my assumption of the buffer structure is correct, it seems that the buffer 
is not correctly initialized in EapBegin. Can me someone tell me please what is 
the correct definition of the _EAPCB structure for EAP-TLS and how the buffer 
should be initialized? Thanks for your help.

Best regards.
Lucian
_______________________________________________
eap mailing list
[email-masked]
http://mail.frascone.com/mailman/listinfo/eap