As part of trying to debug an issue, I am trying to understand how a private key is encrypted in a pem certificate, because I am wondering whether curl
If you are using passphrase, of course your key is encrypted !
A passphrase is a word or phrase that protects private key files.
It prevents unauthorized users from encrypting them.
Usually it's just the secret encryption/decryption key used for Ciphers.