Not able to generate private.key file

I am developing MDM solution for that I need to create several certificates. For that I have following this document.

When I'm firing this command, I am getting this error.

openssl rsa -in key.pem -out private.key

Error:

unable to load Private Key 4713004652:error:09FFF06C:PEM routines:CRYPTO_internal:no start line:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.11.1/libressl-2.8/crypto/pem/pem_lib.c:684:Expecting: ANY PRIVATE KEY

could any one guide me, how to resolve this issue?


Essentially the guide you're following will later instruct you to use a Python script mdm_vendor_sign.py that automates a lot of the otherwise manual steps, you would have to take to create an MDM vendor certificate signing request.

One limitation of that script is that it does not support interactively requesting the passphrase for the private key. Therefore the private key must not have a passphrase in order to be used with this tool.

Ordinarily you would recommend that you create a private key protected by a pass phrase, and then temporarily strip out the password to use the script, and then delete the stripped key again - in order to safe guard the private key.

However, you seem to have created a private key without entering a passphrase at all. Therefore you just need to skip this specific step in the guide - there's simply to passphrase to skip.

I would still recommend that you do actually use a passphrase with your private key, as this is the step protecting you from exposure if the key file is leaked to a third party.