summaryrefslogtreecommitdiffstats
path: root/CryptoPkg
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2021-12-02 18:00:39 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commitc8f46130f88d0816ec6de8a8b69c63dcdd94e3a6 (patch)
tree7ebf3532b3714e10cafa928b6e2486f089c3f829 /CryptoPkg
parent9607597a746b6d3ded880de48f52080f0ddf9293 (diff)
downloadedk2-c8f46130f88d0816ec6de8a8b69c63dcdd94e3a6.tar.gz
edk2-c8f46130f88d0816ec6de8a8b69c63dcdd94e3a6.tar.bz2
edk2-c8f46130f88d0816ec6de8a8b69c63dcdd94e3a6.zip
CryptoPkg: Change OPTIONAL keyword usage style
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'CryptoPkg')
-rw-r--r--CryptoPkg/Driver/Crypto.c20
-rw-r--r--CryptoPkg/Include/Library/BaseCryptLib.h8
-rw-r--r--CryptoPkg/Include/Library/TlsLib.h13
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c5
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c5
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c6
-rw-r--r--CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c4
-rw-r--r--CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c5
-rw-r--r--CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c4
-rw-r--r--CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c20
-rw-r--r--CryptoPkg/Library/TlsLib/TlsProcess.c13
-rw-r--r--CryptoPkg/Library/TlsLibNull/TlsProcessNull.c13
-rw-r--r--CryptoPkg/Private/Protocol/Crypto.h16
13 files changed, 63 insertions, 69 deletions
diff --git a/CryptoPkg/Driver/Crypto.c b/CryptoPkg/Driver/Crypto.c
index 26f280cd5d..de9c5e9a01 100644
--- a/CryptoPkg/Driver/Crypto.c
+++ b/CryptoPkg/Driver/Crypto.c
@@ -2638,7 +2638,7 @@ EFIAPI
CryptoServiceX509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -2676,7 +2676,7 @@ EFIAPI
CryptoServiceX509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
)
{
@@ -2945,8 +2945,8 @@ CryptoServicePkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
)
@@ -3697,9 +3697,9 @@ EFI_STATUS
EFIAPI
CryptoServiceTlsDoHandshake (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -3735,9 +3735,9 @@ EFI_STATUS
EFIAPI
CryptoServiceTlsHandleAlert (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
diff --git a/CryptoPkg/Include/Library/BaseCryptLib.h b/CryptoPkg/Include/Library/BaseCryptLib.h
index 630ccb5e75..3755cfab40 100644
--- a/CryptoPkg/Include/Library/BaseCryptLib.h
+++ b/CryptoPkg/Include/Library/BaseCryptLib.h
@@ -1550,7 +1550,7 @@ EFIAPI
X509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
);
@@ -1585,7 +1585,7 @@ EFIAPI
X509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
);
@@ -1821,8 +1821,8 @@ Pkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
);
diff --git a/CryptoPkg/Include/Library/TlsLib.h b/CryptoPkg/Include/Library/TlsLib.h
index 3af7d4bc09..df529bc138 100644
--- a/CryptoPkg/Include/Library/TlsLib.h
+++ b/CryptoPkg/Include/Library/TlsLib.h
@@ -137,9 +137,9 @@ EFI_STATUS
EFIAPI
TlsDoHandshake (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
);
@@ -172,9 +172,9 @@ EFI_STATUS
EFIAPI
TlsHandleAlert (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
);
@@ -811,4 +811,3 @@ TlsGetCertRevocationList (
);
#endif // __TLS_LIB_H__
-
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c
index 75225e18e1..970fa2a36e 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1Oaep.c
@@ -50,8 +50,8 @@ Pkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
)
@@ -205,4 +205,3 @@ _Exit:
return Result;
}
-
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c
index 6571fc4a2e..36508947c5 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs1OaepNull.c
@@ -39,8 +39,8 @@ Pkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
)
@@ -48,4 +48,3 @@ Pkcs1v2Encrypt (
ASSERT (FALSE);
return FALSE;
}
-
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
index b1393a89c5..ff96d30b57 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
@@ -354,7 +354,7 @@ InternalX509GetNIDName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
IN INT32 Request_NID,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -496,7 +496,7 @@ EFIAPI
X509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -534,7 +534,7 @@ EFIAPI
X509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
)
{
diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c
index 14309825ed..2835f20a1d 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509Null.c
@@ -175,7 +175,7 @@ EFIAPI
X509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -207,7 +207,7 @@ EFIAPI
X509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
)
{
diff --git a/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c b/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c
index 6571fc4a2e..36508947c5 100644
--- a/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c
+++ b/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptPkcs1OaepNull.c
@@ -39,8 +39,8 @@ Pkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
)
@@ -48,4 +48,3 @@ Pkcs1v2Encrypt (
ASSERT (FALSE);
return FALSE;
}
-
diff --git a/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c b/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c
index 14309825ed..2835f20a1d 100644
--- a/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c
+++ b/CryptoPkg/Library/BaseCryptLibNull/Pk/CryptX509Null.c
@@ -175,7 +175,7 @@ EFIAPI
X509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -207,7 +207,7 @@ EFIAPI
X509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
)
{
diff --git a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
index fcb5913780..6b2a5b11b5 100644
--- a/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
+++ b/CryptoPkg/Library/BaseCryptLibOnProtocolPpi/CryptLib.c
@@ -1752,7 +1752,7 @@ EFIAPI
X509GetCommonName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
)
{
@@ -1790,7 +1790,7 @@ EFIAPI
X509GetOrganizationName (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
)
{
@@ -2060,8 +2060,8 @@ Pkcs1v2Encrypt (
IN UINTN PublicKeySize,
IN UINT8 *InData,
IN UINTN InDataSize,
- IN CONST UINT8 *PrngSeed, OPTIONAL
- IN UINTN PrngSeedSize, OPTIONAL
+ IN CONST UINT8 *PrngSeed OPTIONAL,
+ IN UINTN PrngSeedSize OPTIONAL,
OUT UINT8 **EncryptedData,
OUT UINTN *EncryptedDataSize
)
@@ -2812,9 +2812,9 @@ EFI_STATUS
EFIAPI
TlsDoHandshake (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -2850,9 +2850,9 @@ EFI_STATUS
EFIAPI
TlsHandleAlert (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsLib/TlsProcess.c
index ac952e903d..f64184e348 100644
--- a/CryptoPkg/Library/TlsLib/TlsProcess.c
+++ b/CryptoPkg/Library/TlsLib/TlsProcess.c
@@ -72,9 +72,9 @@ EFI_STATUS
EFIAPI
TlsDoHandshake (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -193,9 +193,9 @@ EFI_STATUS
EFIAPI
TlsHandleAlert (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -454,4 +454,3 @@ TlsWrite (
//
return SSL_write (TlsConn->Ssl, Buffer, (UINT32) BufferSize);
}
-
diff --git a/CryptoPkg/Library/TlsLibNull/TlsProcessNull.c b/CryptoPkg/Library/TlsLibNull/TlsProcessNull.c
index 2949d4c885..f06777b96d 100644
--- a/CryptoPkg/Library/TlsLibNull/TlsProcessNull.c
+++ b/CryptoPkg/Library/TlsLibNull/TlsProcessNull.c
@@ -61,9 +61,9 @@ EFI_STATUS
EFIAPI
TlsDoHandshake (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -100,9 +100,9 @@ EFI_STATUS
EFIAPI
TlsHandleAlert (
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
)
{
@@ -244,4 +244,3 @@ TlsWrite (
ASSERT(FALSE);
return 0;
}
-
diff --git a/CryptoPkg/Private/Protocol/Crypto.h b/CryptoPkg/Private/Protocol/Crypto.h
index 498f8e387d..e38ecbb3b1 100644
--- a/CryptoPkg/Private/Protocol/Crypto.h
+++ b/CryptoPkg/Private/Protocol/Crypto.h
@@ -1991,7 +1991,7 @@ EFI_STATUS
(EFIAPI *EDKII_CRYPTO_X509_GET_COMMON_NAME) (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *CommonName, OPTIONAL
+ OUT CHAR8 *CommonName OPTIONAL,
IN OUT UINTN *CommonNameSize
);
@@ -2026,7 +2026,7 @@ EFI_STATUS
(EFIAPI *EDKII_CRYPTO_X509_GET_ORGANIZATION_NAME) (
IN CONST UINT8 *Cert,
IN UINTN CertSize,
- OUT CHAR8 *NameBuffer, OPTIONAL
+ OUT CHAR8 *NameBuffer OPTIONAL,
IN OUT UINTN *NameBufferSize
);
@@ -2735,9 +2735,9 @@ typedef
EFI_STATUS
(EFIAPI* EDKII_CRYPTO_TLS_DO_HANDSHAKE)(
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
);
@@ -2770,9 +2770,9 @@ typedef
EFI_STATUS
(EFIAPI* EDKII_CRYPTO_TLS_HANDLE_ALERT)(
IN VOID *Tls,
- IN UINT8 *BufferIn, OPTIONAL
- IN UINTN BufferInSize, OPTIONAL
- OUT UINT8 *BufferOut, OPTIONAL
+ IN UINT8 *BufferIn OPTIONAL,
+ IN UINTN BufferInSize OPTIONAL,
+ OUT UINT8 *BufferOut OPTIONAL,
IN OUT UINTN *BufferOutSize
);