public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
@ 2020-04-09  6:56 Keysound Chang
  2020-04-09  8:27 ` Siyuan, Fu
  2020-04-17  2:38 ` Siyuan, Fu
  0 siblings, 2 replies; 6+ messages in thread
From: Keysound Chang @ 2020-04-09  6:56 UTC (permalink / raw)
  To: devel; +Cc: Keysound Chang, Jiaxin Wu, Siyuan Fu, Maciej Rabeda

From: Keysound Chang <Keysound_Chang@phoenix.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635

According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
alternatives to function keys. Configuration of drivers should be
accomplished via HII and via OS-present interfaces.

Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
---
 .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
 .../TlsAuthConfigDxeStrings.uni               |  2 ++
 .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
 .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
index 3fc924a1d4..0ada835252 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
@@ -52,6 +52,7 @@
 [Protocols]
   gEfiDevicePathProtocolGuid                    ## PRODUCES
   gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
+  gEfiHiiPopupProtocolGuid                      ## CONSUMES
 
 [Guids]
   gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
index 973b8b7716..2b4a27d24e 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
@@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US "Commit Changes and Exit"
 #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US "Discard Changes and Exit"
 
+#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US "Enroll Cert Failure!"
+
 #string STR_CERT_TYPE_PCKS_GUID                      #language en-US "GUID for CERT"
 
 #string STR_NULL                                     #language en-US ""
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
index 2481d1098f..0ef96dfaf2 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
@@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
   OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
   )
 {
-  EFI_INPUT_KEY                   Key;
   EFI_STATUS                      Status;
   RETURN_STATUS                   RStatus;
   TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
@@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
   TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
   UINT16                          LabelId;
   EFI_DEVICE_PATH_PROTOCOL        *File;
+  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
+  EFI_HII_POPUP_SELECTION         PopUpSelect;
 
   Status           = EFI_SUCCESS;
   File             = NULL;
@@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
   Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
 
   mTlsAuthPrivateData = Private;
+  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL, &HiiPopUp);
+  if (EFI_ERROR (Status)) {
+    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n", Status));
+    return Status;
+  }
 
   //
   // Retrieve uncommitted data from Browser
@@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
       if (EFI_ERROR (Status)) {
         CleanFileContext (Private);
 
-        CreatePopUp (
-          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
-          &Key,
-          L"ERROR: Enroll Cert Failure!",
-          NULL
+        HiiPopUp->CreatePopup(
+          HiiPopUp,
+          EfiHiiPopupStyleError,
+          EfiHiiPopupTypeOk,
+          Private->RegisteredHandle,
+          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
+          &PopUpSelect
           );
       }
       break;
diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
index e9af492893..68c16845b3 100644
--- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
+++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
@@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 #include <Protocol/HiiConfigAccess.h>
 #include <Protocol/SimpleFileSystem.h>
+#include <Protocol/HiiPopup.h>
 
 //
 // Libraries
-- 
2.23.0.windows.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
  2020-04-09  6:56 [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp() Keysound Chang
@ 2020-04-09  8:27 ` Siyuan, Fu
  2020-04-09  9:20   ` [edk2-devel] " 張金松
  2020-04-17  2:38 ` Siyuan, Fu
  1 sibling, 1 reply; 6+ messages in thread
From: Siyuan, Fu @ 2020-04-09  8:27 UTC (permalink / raw)
  To: Keysound Chang, devel@edk2.groups.io; +Cc: Wu, Jiaxin, Maciej Rabeda

Hi, Chang

I received 4 patch mails with the same title "[PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()". Did you sent them by mistake or they are different patches? Please update the title with [PATCH v*] prefix if the patch content is changed so we could know which is the latest one. Thanks

Best Regards
Siyuan 

> -----Original Message-----
> From: Keysound Chang <keysound_chang@phoenix.com>
> Sent: 2020年4月9日 14:57
> To: devel@edk2.groups.io
> Cc: Keysound Chang <Keysound_Chang@phoenix.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>
> Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of
> CreatePopUp()
> 
> From: Keysound Chang <Keysound_Chang@phoenix.com>
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
> 
> According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
> alternatives to function keys. Configuration of drivers should be
> accomplished via HII and via OS-present interfaces.
> 
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> ---
>  .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
>  .../TlsAuthConfigDxeStrings.uni               |  2 ++
>  .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
>  .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
>  4 files changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> index 3fc924a1d4..0ada835252 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> @@ -52,6 +52,7 @@
>  [Protocols]
> 
>    gEfiDevicePathProtocolGuid                    ## PRODUCES
> 
>    gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
> 
> +  gEfiHiiPopupProtocolGuid                      ## CONSUMES
> 
> 
> 
>  [Guids]
> 
>    gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> index 973b8b7716..2b4a27d24e 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> @@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US
> "Commit Changes and Exit"
> 
>  #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US
> "Discard Changes and Exit"
> 
> 
> 
> +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US
> "Enroll Cert Failure!"
> 
> +
> 
>  #string STR_CERT_TYPE_PCKS_GUID                      #language en-US "GUID for
> CERT"
> 
> 
> 
>  #string STR_NULL                                     #language en-US ""
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> index 2481d1098f..0ef96dfaf2 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> @@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
>    OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
> 
>    )
> 
>  {
> 
> -  EFI_INPUT_KEY                   Key;
> 
>    EFI_STATUS                      Status;
> 
>    RETURN_STATUS                   RStatus;
> 
>    TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
> 
> @@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
>    TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
> 
>    UINT16                          LabelId;
> 
>    EFI_DEVICE_PATH_PROTOCOL        *File;
> 
> +  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
> 
> +  EFI_HII_POPUP_SELECTION         PopUpSelect;
> 
> 
> 
>    Status           = EFI_SUCCESS;
> 
>    File             = NULL;
> 
> @@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
>    Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
> 
> 
> 
>    mTlsAuthPrivateData = Private;
> 
> +  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL,
> &HiiPopUp);
> 
> +  if (EFI_ERROR (Status)) {
> 
> +    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
> Status));
> 
> +    return Status;
> 
> +  }
> 
> 
> 
>    //
> 
>    // Retrieve uncommitted data from Browser
> 
> @@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
>        if (EFI_ERROR (Status)) {
> 
>          CleanFileContext (Private);
> 
> 
> 
> -        CreatePopUp (
> 
> -          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> 
> -          &Key,
> 
> -          L"ERROR: Enroll Cert Failure!",
> 
> -          NULL
> 
> +        HiiPopUp->CreatePopup(
> 
> +          HiiPopUp,
> 
> +          EfiHiiPopupStyleError,
> 
> +          EfiHiiPopupTypeOk,
> 
> +          Private->RegisteredHandle,
> 
> +          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
> 
> +          &PopUpSelect
> 
>            );
> 
>        }
> 
>        break;
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> index e9af492893..68c16845b3 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
>  #include <Protocol/HiiConfigAccess.h>
> 
>  #include <Protocol/SimpleFileSystem.h>
> 
> +#include <Protocol/HiiPopup.h>
> 
> 
> 
>  //
> 
>  // Libraries
> 
> --
> 2.23.0.windows.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
  2020-04-09  8:27 ` Siyuan, Fu
@ 2020-04-09  9:20   ` 張金松
  0 siblings, 0 replies; 6+ messages in thread
From: 張金松 @ 2020-04-09  9:20 UTC (permalink / raw)
  To: devel, siyuan.fu

[-- Attachment #1: Type: text/plain, Size: 6400 bytes --]

Hi Siyuan,

Sorry for making you confused. Actually all of 4 are the same just because
I thought blocked by mail list and sent many times. Please use last one.

Thanks.

Keysound

Siyuan, Fu <siyuan.fu@intel.com> 於 2020年4月9日 週四 下午4:28寫道:

> Hi, Chang
>
> I received 4 patch mails with the same title "[PATCH]
> NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()". Did
> you sent them by mistake or they are different patches? Please update the
> title with [PATCH v*] prefix if the patch content is changed so we could
> know which is the latest one. Thanks
>
> Best Regards
> Siyuan
>
> > -----Original Message-----
> > From: Keysound Chang <keysound_chang@phoenix.com>
> > Sent: 2020年4月9日 14:57
> > To: devel@edk2.groups.io
> > Cc: Keysound Chang <Keysound_Chang@phoenix.com>; Wu, Jiaxin
> > <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Maciej Rabeda
> > <maciej.rabeda@linux.intel.com>
> > Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of
> > CreatePopUp()
> >
> > From: Keysound Chang <Keysound_Chang@phoenix.com>
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
> >
> > According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
> > alternatives to function keys. Configuration of drivers should be
> > accomplished via HII and via OS-present interfaces.
> >
> > Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> > Cc: Siyuan Fu <siyuan.fu@intel.com>
> > Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> > ---
> >  .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
> >  .../TlsAuthConfigDxeStrings.uni               |  2 ++
> >  .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
> >  .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
> >  4 files changed, 18 insertions(+), 6 deletions(-)
> >
> > diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> > b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> > index 3fc924a1d4..0ada835252 100644
> > --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> > +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> > @@ -52,6 +52,7 @@
> >  [Protocols]
> >
> >    gEfiDevicePathProtocolGuid                    ## PRODUCES
> >
> >    gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
> >
> > +  gEfiHiiPopupProtocolGuid                      ## CONSUMES
> >
> >
> >
> >  [Guids]
> >
> >    gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
> >
> > diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> > b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> > index 973b8b7716..2b4a27d24e 100644
> > --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> > +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> > @@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US
> > "Commit Changes and Exit"
> >
> >  #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US
> > "Discard Changes and Exit"
> >
> >
> >
> > +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US
> > "Enroll Cert Failure!"
> >
> > +
> >
> >  #string STR_CERT_TYPE_PCKS_GUID                      #language en-US
> "GUID for
> > CERT"
> >
> >
> >
> >  #string STR_NULL                                     #language en-US ""
> >
> > diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> > b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> > index 2481d1098f..0ef96dfaf2 100644
> > --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> > +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> > @@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
> >    OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
> >
> >    )
> >
> >  {
> >
> > -  EFI_INPUT_KEY                   Key;
> >
> >    EFI_STATUS                      Status;
> >
> >    RETURN_STATUS                   RStatus;
> >
> >    TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
> >
> > @@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
> >    TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
> >
> >    UINT16                          LabelId;
> >
> >    EFI_DEVICE_PATH_PROTOCOL        *File;
> >
> > +  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
> >
> > +  EFI_HII_POPUP_SELECTION         PopUpSelect;
> >
> >
> >
> >    Status           = EFI_SUCCESS;
> >
> >    File             = NULL;
> >
> > @@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
> >    Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
> >
> >
> >
> >    mTlsAuthPrivateData = Private;
> >
> > +  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL,
> > &HiiPopUp);
> >
> > +  if (EFI_ERROR (Status)) {
> >
> > +    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
> > Status));
> >
> > +    return Status;
> >
> > +  }
> >
> >
> >
> >    //
> >
> >    // Retrieve uncommitted data from Browser
> >
> > @@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
> >        if (EFI_ERROR (Status)) {
> >
> >          CleanFileContext (Private);
> >
> >
> >
> > -        CreatePopUp (
> >
> > -          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> >
> > -          &Key,
> >
> > -          L"ERROR: Enroll Cert Failure!",
> >
> > -          NULL
> >
> > +        HiiPopUp->CreatePopup(
> >
> > +          HiiPopUp,
> >
> > +          EfiHiiPopupStyleError,
> >
> > +          EfiHiiPopupTypeOk,
> >
> > +          Private->RegisteredHandle,
> >
> > +          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
> >
> > +          &PopUpSelect
> >
> >            );
> >
> >        }
> >
> >        break;
> >
> > diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> > b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> > index e9af492893..68c16845b3 100644
> > --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> > +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> > @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> >
> >
> >  #include <Protocol/HiiConfigAccess.h>
> >
> >  #include <Protocol/SimpleFileSystem.h>
> >
> > +#include <Protocol/HiiPopup.h>
> >
> >
> >
> >  //
> >
> >  // Libraries
> >
> > --
> > 2.23.0.windows.1
>
>
> 
>
>

[-- Attachment #2: Type: text/html, Size: 9041 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
  2020-04-09  6:56 [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp() Keysound Chang
  2020-04-09  8:27 ` Siyuan, Fu
@ 2020-04-17  2:38 ` Siyuan, Fu
  2020-04-17 16:06   ` [edk2-devel] " Maciej Rabeda
  1 sibling, 1 reply; 6+ messages in thread
From: Siyuan, Fu @ 2020-04-17  2:38 UTC (permalink / raw)
  To: Keysound Chang, devel@edk2.groups.io; +Cc: Wu, Jiaxin, Maciej Rabeda

Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>

> -----Original Message-----
> From: Keysound Chang <keysound_chang@phoenix.com>
> Sent: 2020年4月9日 14:57
> To: devel@edk2.groups.io
> Cc: Keysound Chang <Keysound_Chang@phoenix.com>; Wu, Jiaxin
> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Maciej Rabeda
> <maciej.rabeda@linux.intel.com>
> Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of
> CreatePopUp()
> 
> From: Keysound Chang <Keysound_Chang@phoenix.com>
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
> 
> According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
> alternatives to function keys. Configuration of drivers should be
> accomplished via HII and via OS-present interfaces.
> 
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> ---
>  .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
>  .../TlsAuthConfigDxeStrings.uni               |  2 ++
>  .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
>  .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
>  4 files changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> index 3fc924a1d4..0ada835252 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
> @@ -52,6 +52,7 @@
>  [Protocols]
> 
>    gEfiDevicePathProtocolGuid                    ## PRODUCES
> 
>    gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
> 
> +  gEfiHiiPopupProtocolGuid                      ## CONSUMES
> 
> 
> 
>  [Guids]
> 
>    gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> index 973b8b7716..2b4a27d24e 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
> @@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US
> "Commit Changes and Exit"
> 
>  #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US
> "Discard Changes and Exit"
> 
> 
> 
> +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US
> "Enroll Cert Failure!"
> 
> +
> 
>  #string STR_CERT_TYPE_PCKS_GUID                      #language en-US "GUID for
> CERT"
> 
> 
> 
>  #string STR_NULL                                     #language en-US ""
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> index 2481d1098f..0ef96dfaf2 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
> @@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
>    OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
> 
>    )
> 
>  {
> 
> -  EFI_INPUT_KEY                   Key;
> 
>    EFI_STATUS                      Status;
> 
>    RETURN_STATUS                   RStatus;
> 
>    TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
> 
> @@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
>    TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
> 
>    UINT16                          LabelId;
> 
>    EFI_DEVICE_PATH_PROTOCOL        *File;
> 
> +  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
> 
> +  EFI_HII_POPUP_SELECTION         PopUpSelect;
> 
> 
> 
>    Status           = EFI_SUCCESS;
> 
>    File             = NULL;
> 
> @@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
>    Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
> 
> 
> 
>    mTlsAuthPrivateData = Private;
> 
> +  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL,
> &HiiPopUp);
> 
> +  if (EFI_ERROR (Status)) {
> 
> +    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
> Status));
> 
> +    return Status;
> 
> +  }
> 
> 
> 
>    //
> 
>    // Retrieve uncommitted data from Browser
> 
> @@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
>        if (EFI_ERROR (Status)) {
> 
>          CleanFileContext (Private);
> 
> 
> 
> -        CreatePopUp (
> 
> -          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
> 
> -          &Key,
> 
> -          L"ERROR: Enroll Cert Failure!",
> 
> -          NULL
> 
> +        HiiPopUp->CreatePopup(
> 
> +          HiiPopUp,
> 
> +          EfiHiiPopupStyleError,
> 
> +          EfiHiiPopupTypeOk,
> 
> +          Private->RegisteredHandle,
> 
> +          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
> 
> +          &PopUpSelect
> 
>            );
> 
>        }
> 
>        break;
> 
> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> index e9af492893..68c16845b3 100644
> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
> @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> 
>  #include <Protocol/HiiConfigAccess.h>
> 
>  #include <Protocol/SimpleFileSystem.h>
> 
> +#include <Protocol/HiiPopup.h>
> 
> 
> 
>  //
> 
>  // Libraries
> 
> --
> 2.23.0.windows.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
  2020-04-17  2:38 ` Siyuan, Fu
@ 2020-04-17 16:06   ` Maciej Rabeda
  2020-04-20  3:08     ` Keysound Chang
  0 siblings, 1 reply; 6+ messages in thread
From: Maciej Rabeda @ 2020-04-17 16:06 UTC (permalink / raw)
  To: devel, siyuan.fu, Keysound Chang; +Cc: Wu, Jiaxin

Hi Chang,

For any and all of your future patches, "Signed-off" should contain your 
name + email and maintainer should be in Cc :)

Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>

Thanks,
Maciej

On 17-Apr-20 04:38, Siyuan, Fu wrote:
> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
>
>> -----Original Message-----
>> From: Keysound Chang <keysound_chang@phoenix.com>
>> Sent: 2020年4月9日 14:57
>> To: devel@edk2.groups.io
>> Cc: Keysound Chang <Keysound_Chang@phoenix.com>; Wu, Jiaxin
>> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Maciej Rabeda
>> <maciej.rabeda@linux.intel.com>
>> Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of
>> CreatePopUp()
>>
>> From: Keysound Chang <Keysound_Chang@phoenix.com>
>>
>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
>>
>> According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer
>> alternatives to function keys. Configuration of drivers should be
>> accomplished via HII and via OS-present interfaces.
>>
>> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
>> Cc: Siyuan Fu <siyuan.fu@intel.com>
>> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
>> ---
>>   .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
>>   .../TlsAuthConfigDxeStrings.uni               |  2 ++
>>   .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
>>   .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
>>   4 files changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> index 3fc924a1d4..0ada835252 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> @@ -52,6 +52,7 @@
>>   [Protocols]
>>
>>     gEfiDevicePathProtocolGuid                    ## PRODUCES
>>
>>     gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
>>
>> +  gEfiHiiPopupProtocolGuid                      ## CONSUMES
>>
>>
>>
>>   [Guids]
>>
>>     gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> index 973b8b7716..2b4a27d24e 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> @@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>>   #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US
>> "Commit Changes and Exit"
>>
>>   #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US
>> "Discard Changes and Exit"
>>
>>
>>
>> +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US
>> "Enroll Cert Failure!"
>>
>> +
>>
>>   #string STR_CERT_TYPE_PCKS_GUID                      #language en-US "GUID for
>> CERT"
>>
>>
>>
>>   #string STR_NULL                                     #language en-US ""
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> index 2481d1098f..0ef96dfaf2 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> @@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
>>     OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
>>
>>     )
>>
>>   {
>>
>> -  EFI_INPUT_KEY                   Key;
>>
>>     EFI_STATUS                      Status;
>>
>>     RETURN_STATUS                   RStatus;
>>
>>     TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
>>
>> @@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
>>     TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
>>
>>     UINT16                          LabelId;
>>
>>     EFI_DEVICE_PATH_PROTOCOL        *File;
>>
>> +  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
>>
>> +  EFI_HII_POPUP_SELECTION         PopUpSelect;
>>
>>
>>
>>     Status           = EFI_SUCCESS;
>>
>>     File             = NULL;
>>
>> @@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
>>     Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
>>
>>
>>
>>     mTlsAuthPrivateData = Private;
>>
>> +  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL,
>> &HiiPopUp);
>>
>> +  if (EFI_ERROR (Status)) {
>>
>> +    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit (%r)\n",
>> Status));
>>
>> +    return Status;
>>
>> +  }
>>
>>
>>
>>     //
>>
>>     // Retrieve uncommitted data from Browser
>>
>> @@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
>>         if (EFI_ERROR (Status)) {
>>
>>           CleanFileContext (Private);
>>
>>
>>
>> -        CreatePopUp (
>>
>> -          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
>>
>> -          &Key,
>>
>> -          L"ERROR: Enroll Cert Failure!",
>>
>> -          NULL
>>
>> +        HiiPopUp->CreatePopup(
>>
>> +          HiiPopUp,
>>
>> +          EfiHiiPopupStyleError,
>>
>> +          EfiHiiPopupTypeOk,
>>
>> +          Private->RegisteredHandle,
>>
>> +          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
>>
>> +          &PopUpSelect
>>
>>             );
>>
>>         }
>>
>>         break;
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> index e9af492893..68c16845b3 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>>
>>
>>   #include <Protocol/HiiConfigAccess.h>
>>
>>   #include <Protocol/SimpleFileSystem.h>
>>
>> +#include <Protocol/HiiPopup.h>
>>
>>
>>
>>   //
>>
>>   // Libraries
>>
>> --
>> 2.23.0.windows.1
>
> 
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()
  2020-04-17 16:06   ` [edk2-devel] " Maciej Rabeda
@ 2020-04-20  3:08     ` Keysound Chang
  0 siblings, 0 replies; 6+ messages in thread
From: Keysound Chang @ 2020-04-20  3:08 UTC (permalink / raw)
  To: devel@edk2.groups.io, maciej.rabeda@linux.intel.com,
	siyuan.fu@intel.com
  Cc: Wu, Jiaxin

Hi Maciej,

Thanks for your friendly reminder. I'll following the rule next time.

Keysound

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Maciej Rabeda via groups.io
Sent: Saturday, April 18, 2020 12:06 AM
To: devel@edk2.groups.io; siyuan.fu@intel.com; Keysound Chang <Keysound_Chang@phoenix.com>
Cc: Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: Re: [edk2-devel] [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp()

Hi Chang,

For any and all of your future patches, "Signed-off" should contain your name + email and maintainer should be in Cc :)

Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>

Thanks,
Maciej

On 17-Apr-20 04:38, Siyuan, Fu wrote:
> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
>
>> -----Original Message-----
>> From: Keysound Chang <keysound_chang@phoenix.com>
>> Sent: 2020年4月9日 14:57
>> To: devel@edk2.groups.io
>> Cc: Keysound Chang <Keysound_Chang@phoenix.com>; Wu, Jiaxin 
>> <jiaxin.wu@intel.com>; Fu, Siyuan <siyuan.fu@intel.com>; Maciej 
>> Rabeda <maciej.rabeda@linux.intel.com>
>> Subject: [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead 
>> of
>> CreatePopUp()
>>
>> From: Keysound Chang <Keysound_Chang@phoenix.com>
>>
>> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2635
>>
>> According to EDK2 Driver Writer's Guide For UEFI 2.3.1, 4.2.18 Offer 
>> alternatives to function keys. Configuration of drivers should be 
>> accomplished via HII and via OS-present interfaces.
>>
>> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
>> Cc: Siyuan Fu <siyuan.fu@intel.com>
>> Signed-off-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
>> ---
>>   .../TlsAuthConfigDxe/TlsAuthConfigDxe.inf     |  1 +
>>   .../TlsAuthConfigDxeStrings.uni               |  2 ++
>>   .../TlsAuthConfigDxe/TlsAuthConfigImpl.c      | 20 +++++++++++++------
>>   .../TlsAuthConfigDxe/TlsAuthConfigImpl.h      |  1 +
>>   4 files changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> index 3fc924a1d4..0ada835252 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf
>> @@ -52,6 +52,7 @@
>>   [Protocols]
>>
>>     gEfiDevicePathProtocolGuid                    ## PRODUCES
>>
>>     gEfiHiiConfigAccessProtocolGuid               ## PRODUCES
>>
>> +  gEfiHiiPopupProtocolGuid                      ## CONSUMES
>>
>>
>>
>>   [Guids]
>>
>>     gTlsAuthConfigGuid                            ## PRODUCES  ## GUID
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> index 973b8b7716..2b4a27d24e 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxeStrings.uni
>> @@ -28,6 +28,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>>   #string STR_TLS_AUTH_CONFIG_SAVE_AND_EXIT            #language en-US
>> "Commit Changes and Exit"
>>
>>   #string STR_TLS_AUTH_CONFIG_NO_SAVE_AND_EXIT         #language en-US
>> "Discard Changes and Exit"
>>
>>
>>
>> +#string STR_TLS_AUTH_ENROLL_CERT_FAILURE             #language en-US
>> "Enroll Cert Failure!"
>>
>> +
>>
>>   #string STR_CERT_TYPE_PCKS_GUID                      #language en-US "GUID for
>> CERT"
>>
>>
>>
>>   #string STR_NULL                                     #language en-US ""
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> index 2481d1098f..0ef96dfaf2 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c
>> @@ -1383,7 +1383,6 @@ TlsAuthConfigAccessCallback (
>>     OUT    EFI_BROWSER_ACTION_REQUEST             *ActionRequest
>>
>>     )
>>
>>   {
>>
>> -  EFI_INPUT_KEY                   Key;
>>
>>     EFI_STATUS                      Status;
>>
>>     RETURN_STATUS                   RStatus;
>>
>>     TLS_AUTH_CONFIG_PRIVATE_DATA    *Private;
>>
>> @@ -1391,6 +1390,8 @@ TlsAuthConfigAccessCallback (
>>     TLS_AUTH_CONFIG_IFR_NVDATA      *IfrNvData;
>>
>>     UINT16                          LabelId;
>>
>>     EFI_DEVICE_PATH_PROTOCOL        *File;
>>
>> +  EFI_HII_POPUP_PROTOCOL          *HiiPopUp;
>>
>> +  EFI_HII_POPUP_SELECTION         PopUpSelect;
>>
>>
>>
>>     Status           = EFI_SUCCESS;
>>
>>     File             = NULL;
>>
>> @@ -1402,6 +1403,11 @@ TlsAuthConfigAccessCallback (
>>     Private = TLS_AUTH_CONFIG_PRIVATE_FROM_THIS (This);
>>
>>
>>
>>     mTlsAuthPrivateData = Private;
>>
>> +  Status = gBS->LocateProtocol (&gEfiHiiPopupProtocolGuid, NULL,
>> &HiiPopUp);
>>
>> +  if (EFI_ERROR (Status)) {
>>
>> +    DEBUG ((DEBUG_ERROR, "Can't find Form PopUp protocol. Exit 
>> + (%r)\n",
>> Status));
>>
>> +    return Status;
>>
>> +  }
>>
>>
>>
>>     //
>>
>>     // Retrieve uncommitted data from Browser
>>
>> @@ -1460,11 +1466,13 @@ TlsAuthConfigAccessCallback (
>>         if (EFI_ERROR (Status)) {
>>
>>           CleanFileContext (Private);
>>
>>
>>
>> -        CreatePopUp (
>>
>> -          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
>>
>> -          &Key,
>>
>> -          L"ERROR: Enroll Cert Failure!",
>>
>> -          NULL
>>
>> +        HiiPopUp->CreatePopup(
>>
>> +          HiiPopUp,
>>
>> +          EfiHiiPopupStyleError,
>>
>> +          EfiHiiPopupTypeOk,
>>
>> +          Private->RegisteredHandle,
>>
>> +          STRING_TOKEN(STR_TLS_AUTH_ENROLL_CERT_FAILURE),
>>
>> +          &PopUpSelect
>>
>>             );
>>
>>         }
>>
>>         break;
>>
>> diff --git a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> index e9af492893..68c16845b3 100644
>> --- a/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> +++ b/NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h
>> @@ -14,6 +14,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>>
>>
>>   #include <Protocol/HiiConfigAccess.h>
>>
>>   #include <Protocol/SimpleFileSystem.h>
>>
>> +#include <Protocol/HiiPopup.h>
>>
>>
>>
>>   //
>>
>>   // Libraries
>>
>> --
>> 2.23.0.windows.1
>
> 
>





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-20  3:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09  6:56 [PATCH] NetworkPkg/TlsAuthConfigDxe: Use HiiPopUp() instead of CreatePopUp() Keysound Chang
2020-04-09  8:27 ` Siyuan, Fu
2020-04-09  9:20   ` [edk2-devel] " 張金松
2020-04-17  2:38 ` Siyuan, Fu
2020-04-17 16:06   ` [edk2-devel] " Maciej Rabeda
2020-04-20  3:08     ` Keysound Chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox