Rejecting my self-signed certificate

Attempting to use https with Node-RED. Worked up a pair of .pem files with Openssl that test out okay with the OpenSSL utilities, but when I uncommented and set the paths in the Node-RED settings.js file, I get this error when re-starting:0909006C:PEM routines:get_name:no start line

I'm not well versed in SSL certificates at all, but they look okay to me- tried creating new files a number of times with no success. It seems Node-RED is finding the .pem files, but does not like the format? Is there a better way for me to create the keys than Openssl? Or, more likely, my lack of knowledge is hindering progress.....
I am using a AWS EC2 Ubuntu server to host Node-RED.

Any help appreciated