From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f176.google.com (mail-pg1-f176.google.com [209.85.215.176]) by mx.groups.io with SMTP id smtpd.web11.5854.1607688574976362629 for ; Fri, 11 Dec 2020 04:09:35 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iDibMfiq; spf=pass (domain: gmail.com, ip: 209.85.215.176, mailfrom: emergingsiva@gmail.com) Received: by mail-pg1-f176.google.com with SMTP id c12so6497298pgm.4 for ; Fri, 11 Dec 2020 04:09:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CSYhOUiOj2/49AnIGDaqm393CJlrM9L+BbW7I4hDx0U=; b=iDibMfiqY1K+5VbGcxRXN9ebpb3jzinB97FTwOaha7zEMjaQ+63OF387e+XeK1IxRo 5DRhmafVnHqyVtHf4FwuahQZCRwWarW3TUpi8REKJmbTwMwVuBOHHLN6awos4cZQOFH7 i41ILMn4qVK/Fch9JTPpVvWHRAyqiIjPRGlFI5fkxG0OFRm6biB6JC192BaKFhUiTlVO 65o7YiyKQiGJzlbWFmzinBmnLMjjpATxp70gcYsKa4XitNCpoKyQ4l854lYkgzuD9231 UjP0TBjI8Hz7wx8lz+tDj64atxTa6LN8ITGLDy+igUP7VwPS+YD2511luCi6FLvUXfKf mLlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=CSYhOUiOj2/49AnIGDaqm393CJlrM9L+BbW7I4hDx0U=; b=bTFAnEfm4w5SuhZrUNEqfoNXd7PECk/tI4gaQVWkfIKsUnMfy4qGrH32gvtMuG0KDw qVvC3A7Gciy1FugPbKbjMfo0BgryRuTsK9gUsR0ilqaAA6LpgH9qwyOrP3krvAqaU+NU WLU8a8eaHoKEuzaDsHt3+l6snBd49F53L3bprKMWzKyhTtR8oraFomIHwnW/XzLNKM1a 0lN3vdtkxcuhPgiIHXo0lyElRHJKPUeRjTWgPNYcyQ/yPuPnn3thNso1gUfdDjKn1l7+ 8xP1Wosk6I1rDeoAMnJtieLtBvqbW3hn5bZ4e/s+9KbaumM7uchzjU/q6UrkWF9Fedbt De6Q== X-Gm-Message-State: AOAM530oIJC/Rl9GltpeU8u9TWwbGFXMkp4xmrwGWRWMcbhRKMy7VTKn ZfHjyiBGvS5XD4ceJyHRP3SbG/4sD1s= X-Google-Smtp-Source: ABdhPJxWH/7+k+FR9qpkdRdXBiiahmzhOTwXSAtnkgnU9oR9pgli0jKozSLj6MzSJYvByryTuutf7A== X-Received: by 2002:a62:7fc1:0:b029:19f:1dab:5029 with SMTP id a184-20020a627fc10000b029019f1dab5029mr5281930pfd.13.1607688573851; Fri, 11 Dec 2020 04:09:33 -0800 (PST) Return-Path: Received: from UTILFW-8301.in.megatrends.com ([171.60.239.137]) by smtp.gmail.com with ESMTPSA id a136sm2051526pfd.149.2020.12.11.04.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 04:09:33 -0800 (PST) From: "INDIA\\sivaramann" X-Google-Original-From: "INDIA\\sivaramann" To: devel@edk2.groups.io Subject: [PATCH v1 1/1] Adding changes for issue with Certificate Validation Bug 2433 - HTTPS Certificate Enrollment Issue Date: Fri, 11 Dec 2020 17:39:27 +0530 Message-Id: <20201211120927.1478-1-sivaramann@ami.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable --- 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/HttpsSu= pport.c index 7e0bf85c3c42..5bf2ecec4baa 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -380,6 +380,7 @@ TlsConfigCertificate ( EFI_SIGNATURE_DATA *Cert;=0D UINTN CertArraySizeInBytes;=0D UINTN CertCount;=0D + BOOLEAN CertValidFlag;=0D UINT32 ItemDataSize;=0D =0D CACert =3D NULL;=0D @@ -493,6 +494,7 @@ TlsConfigCertificate ( //=0D ItemDataSize =3D (UINT32) CACertSize;=0D CertList =3D (EFI_SIGNATURE_LIST *) CACert;=0D + CertValidFlag =3D 0;=0D while ((ItemDataSize > 0) && (ItemDataSize >=3D CertList->SignatureListS= ize)) {=0D Cert =3D (EFI_SIGNATURE_DATA *) ((UINT8 *) CertList + sizeof (EFI_SIGN= ATURE_LIST) + CertList->SignatureHeaderSize);=0D CertCount =3D (CertList->SignatureListSize - sizeof (EFI_SIGNATURE_LI= ST) - CertList->SignatureHeaderSize) / CertList->SignatureSize;=0D @@ -506,17 +508,21 @@ TlsConfigCertificate ( Cert->SignatureData,=0D CertList->SignatureSize -= sizeof (Cert->SignatureOwner)=0D );=0D - if (EFI_ERROR (Status)) {=0D - goto FreeCACert;=0D - }=0D + if (!EFI_ERROR (Status)) {=0D + CertValidFlag =3D 1;=0D + }=0D + else=0D + break;=0D =0D Cert =3D (EFI_SIGNATURE_DATA *) ((UINT8 *) Cert + CertList->Signatur= eSize);=0D }=0D =0D ItemDataSize -=3D CertList->SignatureListSize;=0D CertList =3D (EFI_SIGNATURE_LIST *) ((UINT8 *) CertList + CertList->Si= gnatureListSize);=0D - }=0D -=0D + =0D + }=0D + if(CertValidFlag =3D=3D 1)=0D + Status =3D EFI_SUCCESS;=0D FreeCACert:=0D FreePool (CACert);=0D return Status;=0D 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=0D +*.dsc.inc=0D +*.dsc=0D +*.fdf=0D +*.inf=0D +*.h=0D +*.vfr=0D +*.c=0D 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]=0D +[empty line]=0D +Signed-off-by: Sivaraman =0D --=20 2.28.0.windows.1