SSL certificate troubles

Recently, I had trouble installing a 3rd party certificate, and found these commands for Linux that can help debug the supplied files. The commands are run from the command line, in the directory where the files are located.

openssl rsa -noout -modulus -in domain.com.key | openssl md5
openssl x509 -noout -modulus -in domain.com.crt | openssl md5
openssl rsa -in domain.com.key -check

It turned out that the files were OK, but I needed to open one of the files in the web hosting file manager editor, and copy/paste from there. Bizarre, but it worked.