mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
pkcs7: Correct various syntatical mistakes
Resond to feedback from the following comments: - use correct spacing [1-7] - remove unnecessary parenthesis [8] - fixup comments [9-11] - remove unnecessary init work [12] - use var instead of type for sizeof [13] [1] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953655691 [2] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953661514 [3] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953689929 [4] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953696384 [5] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953697558 [6] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953697793 [7] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953697951 [8] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r953699102 [9] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r971223775 [10] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r967133905 [11] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r967135932 [12] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r967151430 [13] https://github.com/Mbed-TLS/mbedtls/pull/3431#discussion_r967154159 Signed-off-by: Nick Child <nick.child@ibm.com>
This commit is contained in:
@@ -58,8 +58,7 @@
|
||||
*/
|
||||
void mbedtls_pkcs7_init( mbedtls_pkcs7 *pkcs7 )
|
||||
{
|
||||
memset( pkcs7, 0, sizeof( mbedtls_pkcs7 ) );
|
||||
pkcs7->raw.p = NULL;
|
||||
memset( pkcs7, 0, sizeof( *pkcs7 ) );
|
||||
}
|
||||
|
||||
static int pkcs7_get_next_content_len( unsigned char **p, unsigned char *end,
|
||||
@@ -229,7 +228,7 @@ static int pkcs7_get_certificates( unsigned char **p, unsigned char *end,
|
||||
* So, we support only the root certificate and the single signer.
|
||||
* The behaviour would be improved with addition of multiple signer support.
|
||||
*/
|
||||
if (end_cert != end_set)
|
||||
if ( end_cert != end_set )
|
||||
{
|
||||
ret = MBEDTLS_ERR_PKCS7_FEATURE_UNAVAILABLE;
|
||||
goto out;
|
||||
@@ -702,7 +701,8 @@ out:
|
||||
|
||||
int mbedtls_pkcs7_signed_hash_verify( mbedtls_pkcs7 *pkcs7,
|
||||
const mbedtls_x509_crt *cert,
|
||||
const unsigned char *hash, size_t hashlen)
|
||||
const unsigned char *hash,
|
||||
size_t hashlen )
|
||||
{
|
||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||
const mbedtls_md_info_t *md_info;
|
||||
@@ -750,7 +750,7 @@ int mbedtls_pkcs7_signed_hash_verify( mbedtls_pkcs7 *pkcs7,
|
||||
}
|
||||
|
||||
out:
|
||||
return ( ret );
|
||||
return( ret );
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user