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
python learning
Viewed 2534 times since Wed, Dec 18, 2019
RHCS6: Create a new Logical Volume / Global Filesystem 2 (GFS2)
Viewed 3077 times since Sun, Jun 3, 2018
YUM CRON RHEL7: Configure automatic updates.
Viewed 2559 times since Fri, Oct 26, 2018
A Simple Guide to Oracle Cluster File System (OCFS2) using iSCSI on Oracle Cloud Infrastructure
Viewed 9728 times since Sat, Jun 2, 2018
How to create stunnel with systemd? stunnel
Viewed 11315 times since Thu, Jan 16, 2020
Build a simple RPM that packages a single file
Viewed 9648 times since Sat, Jun 2, 2018
RHEL: What is "SysRq key" and how to use it
Viewed 6606 times since Sat, Jun 2, 2018
How to stop and disable auditd on RHEL 7
Viewed 42178 times since Tue, Aug 6, 2019
systemctl Use systemd to Start a Linux Service at Boot
Viewed 6713 times since Mon, Dec 7, 2020
Linux 16 Useful Bandwidth Monitoring Tools to Analyze Network Usage in Linux
Viewed 17674 times since Mon, Sep 21, 2020