IN WIFI_MGR_NETWORK_PROFILE *Profile\r
)\r
{\r
+ EFI_STATUS Status;\r
+ EDKII_WIFI_PROFILE_SYNC_PROTOCOL *WiFiProfileSyncProtocol;\r
+\r
ZeroMem (Profile->Password, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);\r
ZeroMem (Profile->EapPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);\r
ZeroMem (Profile->PrivateKeyPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE);\r
\r
+ //\r
+ // When EFI WiFi profile sync protocol is found the system is performing a recovery boot in secure\r
+ // boot mode. The profile sync driver will manage the CA certificate, client certificate, and key\r
+ // data, cleaning them at exit boot services.\r
+ //\r
+ Status = gBS->LocateProtocol (&gEdkiiWiFiProfileSyncProtocolGuid, NULL, (VOID **)&WiFiProfileSyncProtocol);\r
+ if (!EFI_ERROR (Status)) {\r
+ return;\r
+ }\r
+\r
if (Profile->CACertData != NULL) {\r
ZeroMem (Profile->CACertData, Profile->CACertSize);\r
FreePool (Profile->CACertData);\r