So I been using this command to match csr's with keys with certificates:
Code:
sudo openssl x509 -noout -modulus -in /etc/pki/tls/certs/localhost.crt | openssl md5
sudo openssl rsa -noout -modulus -in /etc/pki/tls/private/localhost.key| openssl md5
sudo openssl req -noout -modulus -in /etc/pki/tls/certs/hostname.csr | openssl md5
Essentially, all 3 results should match if they go with each other. But for some reason, the results are constantly changing every time I run the same one over and over again. I'm wondering if it has anything to do with CentOS 7.6 or not? I don't remember this ever happening on CentOS 6.9. Any ideas why this is happening?
Edit: I found that on some servers I have, running the same command will produce a hash the first time, then the 2nd time I run it it's different, then the 3rd time will be the same as the 2nd, and from then on out. On another server, I get a different hash every single time. It's strange behavior.
Edit: I ran another test on a server. Testing for the key. I ran the command 10 times. I got a new value every time, except where #5 was the same as #6 and #9 was the same as #10. Though #5 was different than #9. All the other ones were different values.