i think somebody else had this issue , and it was an windows line encoding issue
convert the file to LF (linux line ending ) from a terminal
dos2unix yourfile , if you don't have this utility there are plenty of text editors that have this feature including Visual Code or notepad2-mod (
https://xhmikosr.github.io/notepad2-mod/)
also make sure you copy the cert/key including the separators
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----