Registry corruption due to EAP Profile data


I am working on a WEC7 supplicant which interacts with EAP methods to obtain the blob for the user credentials. As part of supplicant implementation, supplicant calls cmAddConnectionConfig() API to create profile. This CmAddConnectionConfig API is creating a registry entry for profile data at path : [HKEY_LOCAL_MACHINE\Comm\Connmgr\Settings\Connections].

  1. If I use Microsoft EAP methods then blob size retuned by it is 72 bytes and the entry created in registry is 2256 bytes
  2. If I use Proprietary EAP methods then blob size is around 500 and the entry created in registry is approx 6000 bytes which is greater than 4096 bytes.

I am seeing a registry warning if I validate registry due to more registry entry size. how can I avoid this?

I am doubting the following lines of code in profile creation:

CspWiFiSpecificInfo *pCspWiFiInfo = (CspWiFiSpecificInfo*)&pConfig->TypeSpecificInfo[0];
pCspWiFiInfo->cbUserDataOffset = ulXmlBuffer;
pCspWiFiInfo->cbDevConfig = ulXmlBuffer;

I knew above two lines are correct If I create PSK profile, read from But I am creating an enterprise profile.

what is the value to be assigned to element “cbUserDataOffset” of struture CspWiFiSpecificInfo since I am using Extensible Authentication Protocol (EAP) User XML inside the DevConfigXml member ?