diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:09 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | ac0a286f4d747a4c6c603a7b225917293cbe1e9f (patch) | |
tree | 32654f2b35755afc961e2c97296b2dec5762da75 /OvmfPkg/Library/TlsAuthConfigLib | |
parent | d1050b9dff1cace252aff86630bfdb59dff5f507 (diff) | |
download | edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.gz edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.tar.bz2 edk2-ac0a286f4d747a4c6c603a7b225917293cbe1e9f.zip |
OvmfPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the OvmfPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Diffstat (limited to 'OvmfPkg/Library/TlsAuthConfigLib')
-rw-r--r-- | OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c | 142 |
1 files changed, 102 insertions, 40 deletions
diff --git a/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c b/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c index 14b6a2a540..e22de4f5d4 100644 --- a/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c +++ b/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c @@ -36,16 +36,23 @@ SetCaCerts ( VOID
)
{
- EFI_STATUS Status;
- FIRMWARE_CONFIG_ITEM HttpsCaCertsItem;
- UINTN HttpsCaCertsSize;
- VOID *HttpsCaCerts;
+ EFI_STATUS Status;
+ FIRMWARE_CONFIG_ITEM HttpsCaCertsItem;
+ UINTN HttpsCaCertsSize;
+ VOID *HttpsCaCerts;
- Status = QemuFwCfgFindFile ("etc/edk2/https/cacerts", &HttpsCaCertsItem,
- &HttpsCaCertsSize);
+ Status = QemuFwCfgFindFile (
+ "etc/edk2/https/cacerts",
+ &HttpsCaCertsItem,
+ &HttpsCaCertsSize
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_VERBOSE, "%a:%a: not touching CA cert list\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a:%a: not touching CA cert list\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
return;
}
@@ -72,23 +79,36 @@ SetCaCerts ( //
// This is fatal.
//
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n",
- gEfiCallerBaseName, __FUNCTION__, &gEfiTlsCaCertificateGuid,
- EFI_TLS_CA_CERTIFICATE_VARIABLE));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to delete %g:\"%s\"\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ &gEfiTlsCaCertificateGuid,
+ EFI_TLS_CA_CERTIFICATE_VARIABLE
+ ));
ASSERT_EFI_ERROR (Status);
CpuDeadLoop ();
}
if (HttpsCaCertsSize == 0) {
- DEBUG ((DEBUG_VERBOSE, "%a:%a: applied empty CA cert list\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a:%a: applied empty CA cert list\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
return;
}
HttpsCaCerts = AllocatePool (HttpsCaCertsSize);
if (HttpsCaCerts == NULL) {
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to allocate HttpsCaCerts\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to allocate HttpsCaCerts\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
return;
}
@@ -103,14 +123,25 @@ SetCaCerts ( HttpsCaCerts // Data
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\": %r\n",
- gEfiCallerBaseName, __FUNCTION__, &gEfiTlsCaCertificateGuid,
- EFI_TLS_CA_CERTIFICATE_VARIABLE, Status));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to set %g:\"%s\": %r\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ &gEfiTlsCaCertificateGuid,
+ EFI_TLS_CA_CERTIFICATE_VARIABLE,
+ Status
+ ));
goto FreeHttpsCaCerts;
}
- DEBUG ((DEBUG_VERBOSE, "%a:%a: stored CA cert list (%Lu byte(s))\n",
- gEfiCallerBaseName, __FUNCTION__, (UINT64)HttpsCaCertsSize));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a:%a: stored CA cert list (%Lu byte(s))\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ (UINT64)HttpsCaCertsSize
+ ));
FreeHttpsCaCerts:
FreePool (HttpsCaCerts);
@@ -130,18 +161,26 @@ SetCipherSuites ( VOID
)
{
- EFI_STATUS Status;
- FIRMWARE_CONFIG_ITEM HttpsCiphersItem;
- UINTN HttpsCiphersSize;
- VOID *HttpsCiphers;
+ EFI_STATUS Status;
+ FIRMWARE_CONFIG_ITEM HttpsCiphersItem;
+ UINTN HttpsCiphersSize;
+ VOID *HttpsCiphers;
- Status = QemuFwCfgFindFile ("etc/edk2/https/ciphers", &HttpsCiphersItem,
- &HttpsCiphersSize);
+ Status = QemuFwCfgFindFile (
+ "etc/edk2/https/ciphers",
+ &HttpsCiphersItem,
+ &HttpsCiphersSize
+ );
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_VERBOSE, "%a:%a: not touching cipher suites\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a:%a: not touching cipher suites\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
return;
}
+
//
// From this point on, any failure is fatal. An ordered cipher preference
// list is available from QEMU, thus we cannot let the firmware attempt HTTPS
@@ -161,23 +200,36 @@ SetCipherSuites ( NULL // Data
);
if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n",
- gEfiCallerBaseName, __FUNCTION__, &gEdkiiHttpTlsCipherListGuid,
- EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to delete %g:\"%s\"\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ &gEdkiiHttpTlsCipherListGuid,
+ EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE
+ ));
goto Done;
}
if (HttpsCiphersSize == 0) {
- DEBUG ((DEBUG_ERROR, "%a:%a: list of cipher suites must not be empty\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: list of cipher suites must not be empty\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
Status = EFI_INVALID_PARAMETER;
goto Done;
}
HttpsCiphers = AllocatePool (HttpsCiphersSize);
if (HttpsCiphers == NULL) {
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to allocate HttpsCiphers\n",
- gEfiCallerBaseName, __FUNCTION__));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to allocate HttpsCiphers\n",
+ gEfiCallerBaseName,
+ __FUNCTION__
+ ));
Status = EFI_OUT_OF_RESOURCES;
goto Done;
}
@@ -193,14 +245,24 @@ SetCipherSuites ( HttpsCiphers // Data
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\"\n",
- gEfiCallerBaseName, __FUNCTION__, &gEdkiiHttpTlsCipherListGuid,
- EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE));
+ DEBUG ((
+ DEBUG_ERROR,
+ "%a:%a: failed to set %g:\"%s\"\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ &gEdkiiHttpTlsCipherListGuid,
+ EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE
+ ));
goto FreeHttpsCiphers;
}
- DEBUG ((DEBUG_VERBOSE, "%a:%a: stored list of cipher suites (%Lu byte(s))\n",
- gEfiCallerBaseName, __FUNCTION__, (UINT64)HttpsCiphersSize));
+ DEBUG ((
+ DEBUG_VERBOSE,
+ "%a:%a: stored list of cipher suites (%Lu byte(s))\n",
+ gEfiCallerBaseName,
+ __FUNCTION__,
+ (UINT64)HttpsCiphersSize
+ ));
FreeHttpsCiphers:
FreePool (HttpsCiphers);
|