OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu

Jak sprawdzić, czy klucz prywatny pasuje do wydanego certyfikatu? Powinny posiadać identyczny skrót SHA256:

1
openssl rsa -noout -modulus -in kluczdomeny.key 2> /dev/null | sha256sum -
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -
1
openssl x509 -noout -modulus -in certyfikat.crt 2> /dev/null | sha256sum -
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -

Jeśli jest inaczej to znaczy, że coś poszło nie tak w procesie generowania certyfikatu lub pomyliliśmy pliki.

2 (1)
Article Rating (1 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Linux - How to shutdown or reboot
Viewed 1869 times since Fri, Jun 8, 2018
How To Run Multiple SSH Command On Remote Machine And Exit Safely
Viewed 3662 times since Tue, Aug 6, 2019
How To Use Systemctl to Manage Systemd Services and Units
Viewed 7080 times since Mon, Dec 7, 2020
How to stop and disable auditd on RHEL 7
Viewed 38380 times since Tue, Aug 6, 2019
linux manual tools
Viewed 2423 times since Fri, Sep 28, 2018
How to manage Linux password expiry with the chage command
Viewed 10910 times since Tue, Sep 11, 2018
18 Quick ‘lsof’ command examples for Linux Geeks
Viewed 10933 times since Sun, Jun 30, 2019
How to create a Systemd service in Linux
Viewed 2420 times since Mon, Dec 7, 2020
Installing and Configuring an OCFS2 Clustered File System
Viewed 5493 times since Sat, Jun 2, 2018
stunnel How To Encrypt Traffic to Redis with Stunnel on Ubuntu 16.04
Viewed 1782 times since Sun, Dec 6, 2020