🌐
SSLShopper
sslshopper.com › certificate-key-matcher.html
Certificate Key Matcher - Check whether your private key matches your SSL certificate.
The Certificate Key Matcher tool makes it easy to determine whether a private key matches or a CSR matches a certificate.
🌐
SSLShopper
sslshopper.com › assets › snippets › sslshopper › certificate-key-matcher.php
Sslshopper
Find the best SSL Certificate using our SSL Comparison charts and reviews. Learn about SSL, read reviews, and compare SSL certificates.
🌐
Seclore
support.seclore.com › support › solutions › articles › 11000028202-check-if-a-certificate-and-a-private-key-matches
Check if a Certificate and a Private Key matches : Seclore Customer Support - Get Help Today
Step 1: Go to https://www.sslshopper.com/certificate-key-matcher.html Step 2: Select ‘Check if a Certificate and a Private Key matches’ Step 3: i. Open your certificate file with a notepad ii. Copy text. iii. Past...
🌐
Https
https.in › support › certificate-key-matcher
SSL Certificate Key Matcher | Match your CSR and Private Key
SSL Certificate key matcher help you to verify whether the SSL certificate information matches with CSR file or Private Key. You can verify the SSL Certificate information by comparing either with CSR or Private Key.
🌐
GeoCerts
geocerts.com › certificate-key-matcher
GeoCerts: Certificate Key Matcher - GeoCerts
SSL Labs Server Test · CSR Decoder · Certificate Decoder · Certificate Key Matcher · Generate CSR · Install SSL · Support Desk · Quickly verify that your SSL certificate matches your CSR. Results will be displayed here after both boxes are filled. VMC & CMC Mark Certificates ·
🌐
SSL Checker
sslchecker.com › matcher
SSL match CSR/Private Key
Receive infrequent updates on hottest SSL deals. No spam. Ever
🌐
Certera
certera.com › ssl-tools › ssl-certificate-key-matcher
Online Certificate Key Matcher Tool - Match your Certificate Key | Certera
However, you can use the free Certificate Key Matcher tool to determine whether a CSR or private key created for an SSL certificate matches the SSL certificate.
🌐
DigiCert
thesslstore.com › home › ssl tools › certificate key matcher
SSL Certificate Key Matcher Check whether Your Private Key Matches Your SSL
SSL Certificate Key Matcher Guide helps you to check whether your private key and SSL certificate is matching or not. SSL Key Matcher also checks the modulus of your certificate, private key, and CSR to verify if they match.
🌐
Sslretail
sslretail.com › ssl-checker
SSL Checker
SSL Checker · CSR Decoder · Certificate Decoder · Certificate Key Matcher · Generate CSR ·
Top answer
1 of 3
7

Based on commands given in Verifying that a Private Key Matches a Certificate (originally from The Apache SSL FAQ) it's possible to build a small bash script that iterates through all *.key files in the folder and compares the modulus portion of the certificate with every key at once.

My findkey.sh takes the certificate's filename as a command line argument & prints the matches.

#!/bin/bash
cert=$1
crthash=$(openssl x509 -noout -modulus -in "$cert" | openssl md5)
echo $cert $crthash

for file in *.key; do
    [ -e "$file" ] || continue
    keyhash=$(openssl rsa -noout -modulus -in "$file" | openssl md5)
    if [ "$keyhash" = "$crthash" ]
    then
        keytest==$(openssl rsa -in "$file" -check -noout)
        echo $file $keyhash $keytest
    fi
done

I created some key pairs testN.key / testN.crt and tested my script, which seems to do the job:

./findkey.sh test4.crt
test4.crt (stdin)= 8e30eac60ff8d3c5b1c9bee7e79774bb
test4.key (stdin)= 8e30eac60ff8d3c5b1c9bee7e79774bb =RSA key ok

It doesn't matter if there's some certificates (or certificate requests) among the keys, because even if named incorrectly as *.key the openssl rsa -modulus would give unable to load Private Key error instead of the modulus for the certificate. In addition, the end of the line tells whether the key is consistent, to prevent fake private keys. You only need this script & OpenSSL installed.

2 of 3
0

You may use a certificate key matcher tool to check whether your private key matches the certificate like the following one:

https://www.sslshopper.com/certificate-key-matcher.html

Moreover if you want to use the openssl commandline tool, the followings would be a suggested for reading:

  • https://kb.wisc.edu/middleware/page.php?id=4064
  • http://httpd.apache.org/docs/2.0/ssl/ssl_faq.html#verify
Find elsewhere
🌐
RapidSSL
rapidsslonline.com › home › ssl tools › certificate key matcher
Match Your SSL Certificate & Private Key in Few Clicks
Use few OpenSSL commands and match essential elements like SSL certificate, Private Key, and Certificate Signing Request.
🌐
Decoder
decoder.link › matcher
SSL Matcher
Check if a private key or CSR matches an SSL certificate.
🌐
Leaderssl
leaderssl.co.uk › tools › certificate_key_matcher
SSL Certificate Key Matcher | LeaderSSL
Using our tool you can check whether the certificate matches using a key or CSR.
🌐
SSLInsights
sslinsights.com › home › certificate key matcher tool
Free Certificate Key Matcher Tool
February 10, 2024 - Check if an SSL certificate matches its private key by uploading both files using the free Certificate Key Matcher Tool.
Address   1207 Delaware Ave #2838, 19806, Wilmington
(5.0)