Hi,
I hope everyone is doing well. I am a beginner on mbedtls and cryptography. I hope you will understand if there is a lack of understanding or a rookie mistake from my part.   

So, My goal is to do a key-encryption key. I have an RSA private key file "private.pem" generated by OpenSSL. I want to encrypt the content of this  "private.pem" with AES encryption and followed by AES decryption on the encrypted data.

To do that, I read the "private.pem" file into a buffer and perform AES encryption. The problem is when I perform the AES decryption operation I get something else instead of the original "private.pem" data. I have a working example of AES encryption/decryption working on plaintext perfectly. So, I guess there is a flaw in my understanding of encryption/decryption of byte64 encoded string. 

Can someone please suggests me how can I encrypt RSA private key with AES? 

Thanks,
Shariful