X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FBaseCryptLib%2FPem%2FCryptPem.c;h=319ad59eccfe761f420fd9e75060de1617169ec5;hb=6b8ebcb8de52ae5cab543181712e53eeb94340a7;hp=2c3a97b2c0f91539d5e3113e96cf9b0fd65ce4d2;hpb=805c2dd1198760778d6460280f5cc5e93a04d612;p=mirror_edk2.git diff --git a/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c b/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c index 2c3a97b2c0..319ad59ecc 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c +++ b/CryptoPkg/Library/BaseCryptLib/Pem/CryptPem.c @@ -36,7 +36,7 @@ PasswordCallback ( { INTN KeyLength; - ZeroMem ((VOID *)Buf, (UINTN)Size); + ZeroMem ((VOID *) Buf, (UINTN) Size); if (Key != NULL) { // // Duplicate key phrase directly. @@ -93,16 +93,16 @@ RsaGetPrivateKeyFromPem ( // Add possible block-cipher descriptor for PEM data decryption. // NOTE: Only support most popular ciphers (3DES, AES) for the encrypted PEM. // - EVP_add_cipher (EVP_des_ede3_cbc()); - EVP_add_cipher (EVP_aes_128_cbc()); - EVP_add_cipher (EVP_aes_192_cbc()); - EVP_add_cipher (EVP_aes_256_cbc()); + EVP_add_cipher (EVP_des_ede3_cbc ()); + EVP_add_cipher (EVP_aes_128_cbc ()); + EVP_add_cipher (EVP_aes_192_cbc ()); + EVP_add_cipher (EVP_aes_256_cbc ()); // // Read encrypted PEM Data. // PemBio = BIO_new (BIO_s_mem ()); - BIO_write (PemBio, PemData, (int)PemSize); + BIO_write (PemBio, PemData, (int) PemSize); if (PemBio == NULL) { goto _Exit; } @@ -110,7 +110,7 @@ RsaGetPrivateKeyFromPem ( // // Retrieve RSA Private Key from encrypted PEM data. // - *RsaContext = PEM_read_bio_RSAPrivateKey (PemBio, NULL, (pem_password_cb *)&PasswordCallback, (void *)Password); + *RsaContext = PEM_read_bio_RSAPrivateKey (PemBio, NULL, (pem_password_cb *) &PasswordCallback, (void *) Password); if (*RsaContext != NULL) { Status = TRUE; }