How to make sure that a certificate and a private key match together?

Hello,

I have a signed certificate and a private key, how to check if they match with openssl in Wndows enviroinment?

TIA!
U4enikAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnmenZCommented:
This link gives you commands to do what you want: http://kb.wisc.edu/middleware/page.php?id=4064

Those commands should work in a Windows installation of OpenSSL.
0
U4enikAuthor Commented:
autocompare doesn't work in Windows, and I don't really understand what numbers to compare
0
JohnmenZCommented:
Can you get outputs from these two commands:

$ openssl x509 -noout -text -in server.crt
$ openssl rsa -noout -text -in server.key

If so, look into the "modulus" part of the outputs, they are match each other, otherwise the key is not for the certificate.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Webinar: What were the top threats in Q2 2018?

Every quarter, the WatchGuard Threat Lab releases an Internet Security Report that describes and analyzes the top threat trends impacting companies around the world. Are you ready to learn more about the top threats of Q2 2018? Register for our Sept. 26th webinar to learn more!

U4enikAuthor Commented:
00:b6:9e:3b:75:4d:f2:12:4b:43:a1:aa:64:79:41:
                    f3:dd:bd:b6:bf:14:bb:05:3f:72:ed:12:c6:d2:5e:
                    9c:72:2c:52:35:93:30:a5:5c:0f:e8:1c:ce:32:ea:
                    7a:61:f8:85:dc:82:50:ef:7e:f2:ab:b1:7a:31:05:
                    76:73:cb:20:8b:af:dc:d0:5b:dd:1a:26:ab:46:e3:
                    3e:0e:e1:a3:01:41:bc:d5:2f:60:08:d5:2f:12:3b:
                    7c:20:5b:3a:2e:66:cd:42:40:72:52:53:52:93:e3:
                    b2:2f:bd:74:08:fd:57:ca:58:34:b4:96:b0:ed:26:
                    ed:a4:f7:63:d1:2b:02:83:11

And

00:dc:15:6c:81:e7:e1:c6:ad:ef:42:e9:47:f1:20:
    83:cf:85:a4:df:8c:26:b1:00:37:54:e5:b4:e0:bb:
    8d:a8:d1:9f:1f:a4:29:7c:08:4f:c5:38:97:b0:bf:
    ea:80:81:91:90:d3:00:8f:e6:c2:29:e1:66:6a:ed:
    08:e1:90:10:4d:77:37:7d:01:8a:cc:e3:46:16:ab:
    3b:4f:99:c8:61:85:59:87:1f:7a:47:4e:bb:e1:47:
    6c:30:c8:e0:d1:fc:01:ed:8e:e4:e2:fe:a4:a1:48:
    73:18:e7:d8:76:36:d6:e7:7c:6a:1c:e8:5d:25:11:
    04:69:5e:94:ec:f3:51:28:b5

So, this is a wrong key, right?
0
JohnmenZCommented:
From what I can see, yes.  But just be sure, you can try the commands on a known matched certificate and key to confirm you are not looking into the wrong place.
0
U4enikAuthor Commented:
Superb!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSL / HTTPS

From novice to tech pro — start learning today.