mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
Fix codestyle issues in pkcs12.h & pkparse.c
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
This commit is contained in:
@@ -99,10 +99,11 @@ extern "C" {
|
|||||||
* \return 0 if successful, or a MBEDTLS_ERR_XXX code
|
* \return 0 if successful, or a MBEDTLS_ERR_XXX code
|
||||||
*/
|
*/
|
||||||
int MBEDTLS_DEPRECATED mbedtls_pkcs12_pbe(mbedtls_asn1_buf *pbe_params, int mode,
|
int MBEDTLS_DEPRECATED mbedtls_pkcs12_pbe(mbedtls_asn1_buf *pbe_params, int mode,
|
||||||
mbedtls_cipher_type_t cipher_type, mbedtls_md_type_t md_type,
|
mbedtls_cipher_type_t cipher_type,
|
||||||
const unsigned char *pwd, size_t pwdlen,
|
mbedtls_md_type_t md_type,
|
||||||
const unsigned char *data, size_t len,
|
const unsigned char *pwd, size_t pwdlen,
|
||||||
unsigned char *output);
|
const unsigned char *data, size_t len,
|
||||||
|
unsigned char *output);
|
||||||
#endif /* MBEDTLS_DEPRECATED_REMOVED */
|
#endif /* MBEDTLS_DEPRECATED_REMOVED */
|
||||||
|
|
||||||
#if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
|
#if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
|
||||||
|
@@ -1498,8 +1498,8 @@ static int pk_parse_key_pkcs8_encrypted_der(
|
|||||||
#if defined(MBEDTLS_PKCS12_C)
|
#if defined(MBEDTLS_PKCS12_C)
|
||||||
if (mbedtls_oid_get_pkcs12_pbe_alg(&pbe_alg_oid, &md_alg, &cipher_alg) == 0) {
|
if (mbedtls_oid_get_pkcs12_pbe_alg(&pbe_alg_oid, &md_alg, &cipher_alg) == 0) {
|
||||||
if ((ret = mbedtls_pkcs12_pbe_ext(&pbe_params, MBEDTLS_PKCS12_PBE_DECRYPT,
|
if ((ret = mbedtls_pkcs12_pbe_ext(&pbe_params, MBEDTLS_PKCS12_PBE_DECRYPT,
|
||||||
cipher_alg, md_alg,
|
cipher_alg, md_alg,
|
||||||
pwd, pwdlen, p, len, buf, len, &outlen)) != 0) {
|
pwd, pwdlen, p, len, buf, len, &outlen)) != 0) {
|
||||||
if (ret == MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH) {
|
if (ret == MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH) {
|
||||||
return MBEDTLS_ERR_PK_PASSWORD_MISMATCH;
|
return MBEDTLS_ERR_PK_PASSWORD_MISMATCH;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user