HOWTO verify ssl cert and keyfile

From Chaos

Jump to: navigation, search
This article is part of the HOWTO series.

Summary

Originally, I was having issues when trying to startup Kerio Mail Server with the appropriate SSL certs:

[28/Oct/2004 09:43:12] socklib.cpp: Cannot load SSL private key file /usr/local/kerio/mailserver/sslcert/server1.key:
error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch

The issue was resolved, when searching for a way to verify my keyfile and certfile.

Details

To verify your cert and key file, use the following (where server1.key and server1.crt are the names of your keyfile and cert, respectively):

openssl rsa -noout -text -in server1.key
openssl x509 -noout -text -in server1.crt

The fields that need to exactly match are Modulus and Exponent. If they do not match, the SSL Cert and Keyfiles won't load.

Personal tools
Sponsored Links