From fe405f08a09e9f2306c72aa23d8edfbcfaa23bff Mon Sep 17 00:00:00 2001 From: Zachary Clark-Williams Date: Wed, 10 Aug 2022 15:32:11 -0700 Subject: NetworkPkg: Add WiFi profile sync protocol support REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3845 Enables KVM and One Click Recovery WLAN capability with WiFi Profile Sync feature and protocol. Adding WiFiProfileSyncProtocol, which supports the profilesync driver operations for transferring WiFi profiles from AMT to the Supplicant. WiFiConnectionManager will check for the WifiProfileSyncProtocol and if found will operate on the premise of a One Click Recovery, or KVM flow with a Wifi profile provided by AMT. Cc: Maciej Rabeda Cc: Wu Jiaxin Cc: Andrei Otcheretianski Signed-off-by: Zachary Clark-Williams Acked-by: Michael D Kinney Reviewed-by: Jiaxin Wu --- NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c') diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c index 4ad5643..154f296 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c @@ -672,10 +672,23 @@ WifiMgrCleanProfileSecrets ( IN WIFI_MGR_NETWORK_PROFILE *Profile ) { + EFI_STATUS Status; + EDKII_WIFI_PROFILE_SYNC_PROTOCOL *WiFiProfileSyncProtocol; + ZeroMem (Profile->Password, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE); ZeroMem (Profile->EapPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE); ZeroMem (Profile->PrivateKeyPassword, sizeof (CHAR16) * PASSWORD_STORAGE_SIZE); + // + // When EFI WiFi profile sync protocol is found the system is performing a recovery boot in secure + // boot mode. The profile sync driver will manage the CA certificate, client certificate, and key + // data, cleaning them at exit boot services. + // + Status = gBS->LocateProtocol (&gEdkiiWiFiProfileSyncProtocolGuid, NULL, (VOID **)&WiFiProfileSyncProtocol); + if (!EFI_ERROR (Status)) { + return; + } + if (Profile->CACertData != NULL) { ZeroMem (Profile->CACertData, Profile->CACertSize); FreePool (Profile->CACertData); -- cgit v1.1