Problem description
The system prompts "The HTTPS private key format is invalid" when you upload an HTTPS certificate file to WAF.
Cause
The private key of the certificate may be encrypted. WAF cannot identify the encrypted private key.
Solution
- View the private key file. If the private key file contains the content that is marked in the red box in the following figure, the private key is encrypted.
- Run the following command and enter a password to decrypt the private key:
openssl rsa -in [$keyName] -text #[$keyName] indicates the name of the private key file.
If the following result is returned, the private key is decrypted. - Re-upload the decrypted private key file to WAF.