Compare the output of the following two lines. They must match:
$ openssl x509 -noout -modulus -in server.pem | openssl md5
$ openssl rsa -noout -modulus -in server.key | openssl md5
Compare the output of the following two lines. They must match:
$ openssl x509 -noout -modulus -in server.pem | openssl md5
$ openssl rsa -noout -modulus -in server.key | openssl md5
$ sort a <(sed -e p b) | uniq -u
Meaning: list unique lines in (contents of file ‘a’ plus duplicated contents of file ‘b’). ’sort’ is required for ‘uniq’ to work.