public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate Enrollment Issue
@ 2020-12-11 12:09 INDIA\sivaramann
  2020-12-11 19:52 ` [edk2-devel] " Michael D Kinney
  0 siblings, 1 reply; 2+ messages in thread
From: INDIA\sivaramann @ 2020-12-11 12:09 UTC (permalink / raw)
  To: devel

---
 NetworkPkg/HttpDxe/HttpsSupport.c | 16 +++++++++++-----
 edk2.diff.order                   |  8 ++++++++
 tianocore.template                |  3 +++
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c
index 7e0bf85c3c42..5bf2ecec4baa 100644
--- a/NetworkPkg/HttpDxe/HttpsSupport.c
+++ b/NetworkPkg/HttpDxe/HttpsSupport.c
@@ -380,6 +380,7 @@ TlsConfigCertificate (
   EFI_SIGNATURE_DATA  *Cert;
   UINTN               CertArraySizeInBytes;
   UINTN               CertCount;
+  BOOLEAN             CertValidFlag;
   UINT32              ItemDataSize;
 
   CACert     = NULL;
@@ -493,6 +494,7 @@ TlsConfigCertificate (
   //
   ItemDataSize = (UINT32) CACertSize;
   CertList = (EFI_SIGNATURE_LIST *) CACert;
+  CertValidFlag = 0;
   while ((ItemDataSize > 0) && (ItemDataSize >= CertList->SignatureListSize)) {
     Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) CertList + sizeof (EFI_SIGNATURE_LIST) + CertList->SignatureHeaderSize);
     CertCount  = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;
@@ -506,17 +508,21 @@ TlsConfigCertificate (
                                                  Cert->SignatureData,
                                                  CertList->SignatureSize - sizeof (Cert->SignatureOwner)
                                                  );
-      if (EFI_ERROR (Status)) {
-        goto FreeCACert;
-      }
+      if (!EFI_ERROR (Status)) {
+          CertValidFlag = 1;
+        }
+      else
+          break;
 
       Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) Cert + CertList->SignatureSize);
     }
 
     ItemDataSize -= CertList->SignatureListSize;
     CertList = (EFI_SIGNATURE_LIST *) ((UINT8 *) CertList + CertList->SignatureListSize);
-  }
-
+    
+    }
+  if(CertValidFlag == 1)
+      Status = EFI_SUCCESS;
 FreeCACert:
   FreePool (CACert);
   return Status;
diff --git a/edk2.diff.order b/edk2.diff.order
new file mode 100644
index 000000000000..1d578ac28cca
--- /dev/null
+++ b/edk2.diff.order
@@ -0,0 +1,8 @@
+*.dec
+*.dsc.inc
+*.dsc
+*.fdf
+*.inf
+*.h
+*.vfr
+*.c
diff --git a/tianocore.template b/tianocore.template
new file mode 100644
index 000000000000..cfc4bdddc4cc
--- /dev/null
+++ b/tianocore.template
@@ -0,0 +1,3 @@
+[empty line]
+[empty line]
+Signed-off-by: Sivaraman <sivaramann@ami.com>
-- 
2.28.0.windows.1


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

* Re: [edk2-devel] [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate Enrollment Issue
  2020-12-11 12:09 [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate Enrollment Issue INDIA\sivaramann
@ 2020-12-11 19:52 ` Michael D Kinney
  0 siblings, 0 replies; 2+ messages in thread
From: Michael D Kinney @ 2020-12-11 19:52 UTC (permalink / raw)
  To: devel@edk2.groups.io, emergingsiva@gmail.com, Kinney, Michael D

edk2.diff.order and tianocore.template should not be part of the patch.

The commit message does not follow the required format and is missing
Signed-off-by.

EDK II Dev Process:

	https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process

EDK II Commit message format:

	https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-Format

It would also help if you would join the EDK II mailing list on groups.io.

	https://edk2.groups.io/g/devel

Thanks,

Mike


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of INDIA\sivaramann
> Sent: Friday, December 11, 2020 4:09 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate
> Enrollment Issue
> 
> ---
>  NetworkPkg/HttpDxe/HttpsSupport.c | 16 +++++++++++-----
>  edk2.diff.order                   |  8 ++++++++
>  tianocore.template                |  3 +++
>  3 files changed, 22 insertions(+), 5 deletions(-)
> 
> diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c
> index 7e0bf85c3c42..5bf2ecec4baa 100644
> --- a/NetworkPkg/HttpDxe/HttpsSupport.c
> +++ b/NetworkPkg/HttpDxe/HttpsSupport.c
> @@ -380,6 +380,7 @@ TlsConfigCertificate (
>    EFI_SIGNATURE_DATA  *Cert;
> 
>    UINTN               CertArraySizeInBytes;
> 
>    UINTN               CertCount;
> 
> +  BOOLEAN             CertValidFlag;
> 
>    UINT32              ItemDataSize;
> 
> 
> 
>    CACert     = NULL;
> 
> @@ -493,6 +494,7 @@ TlsConfigCertificate (
>    //
> 
>    ItemDataSize = (UINT32) CACertSize;
> 
>    CertList = (EFI_SIGNATURE_LIST *) CACert;
> 
> +  CertValidFlag = 0;
> 
>    while ((ItemDataSize > 0) && (ItemDataSize >= CertList->SignatureListSize)) {
> 
>      Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) CertList + sizeof (EFI_SIGNATURE_LIST) + CertList->SignatureHeaderSize);
> 
>      CertCount  = (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LIST) - CertList->SignatureHeaderSize) / CertList-
> >SignatureSize;
> 
> @@ -506,17 +508,21 @@ TlsConfigCertificate (
>                                                   Cert->SignatureData,
> 
>                                                   CertList->SignatureSize - sizeof (Cert->SignatureOwner)
> 
>                                                   );
> 
> -      if (EFI_ERROR (Status)) {
> 
> -        goto FreeCACert;
> 
> -      }
> 
> +      if (!EFI_ERROR (Status)) {
> 
> +          CertValidFlag = 1;
> 
> +        }
> 
> +      else
> 
> +          break;
> 
> 
> 
>        Cert = (EFI_SIGNATURE_DATA *) ((UINT8 *) Cert + CertList->SignatureSize);
> 
>      }
> 
> 
> 
>      ItemDataSize -= CertList->SignatureListSize;
> 
>      CertList = (EFI_SIGNATURE_LIST *) ((UINT8 *) CertList + CertList->SignatureListSize);
> 
> -  }
> 
> -
> 
> +
> 
> +    }
> 
> +  if(CertValidFlag == 1)
> 
> +      Status = EFI_SUCCESS;
> 
>  FreeCACert:
> 
>    FreePool (CACert);
> 
>    return Status;
> 
> diff --git a/edk2.diff.order b/edk2.diff.order
> new file mode 100644
> index 000000000000..1d578ac28cca
> --- /dev/null
> +++ b/edk2.diff.order
> @@ -0,0 +1,8 @@
> +*.dec
> 
> +*.dsc.inc
> 
> +*.dsc
> 
> +*.fdf
> 
> +*.inf
> 
> +*.h
> 
> +*.vfr
> 
> +*.c
> 
> diff --git a/tianocore.template b/tianocore.template
> new file mode 100644
> index 000000000000..cfc4bdddc4cc
> --- /dev/null
> +++ b/tianocore.template
> @@ -0,0 +1,3 @@
> +[empty line]
> 
> +[empty line]
> 
> +Signed-off-by: Sivaraman <sivaramann@ami.com>
> 
> --
> 2.28.0.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#68725): https://edk2.groups.io/g/devel/message/68725
> Mute This Topic: https://groups.io/mt/78887450/1643496
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [michael.d.kinney@intel.com]
> -=-=-=-=-=-=
> 


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

end of thread, other threads:[~2020-12-11 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 12:09 [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate Enrollment Issue INDIA\sivaramann
2020-12-11 19:52 ` [edk2-devel] " Michael D Kinney

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