OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu

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

openssl rsa -noout -modulus -in kluczdomeny.key 2> /dev/null | sha256sum -
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -
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
There are no attachments for this article.
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
How to do a Filesystem Resize (ext3/ext4) on Redhat running on VMware
Viewed 10768 times since Wed, Jul 25, 2018
RHEL: Remove existing SAN LUNs
Viewed 13798 times since Sat, Jun 2, 2018
10 Linux cryptsetup Examples for LUKS Key Management (How to Add, Remove, Change, Reset LUKS encryption Key)
Viewed 4862 times since Tue, Jul 31, 2018
Df command in Linux not updating actual diskspace, wrong data
Viewed 2618 times since Wed, May 30, 2018
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 5861 times since Sat, Jun 2, 2018
How to Synchronize Directories Using Lsyncd in Linux
Viewed 13221 times since Wed, Oct 31, 2018
debian How to check Debian CVE status using python script
Viewed 3347 times since Sun, Sep 23, 2018
systemctl Use systemd to Start a Linux Service at Boot
Viewed 5431 times since Mon, Dec 7, 2020
Red Hat Enterprise Linux - Allow Root Login From a Specific IP Address Only
Viewed 2516 times since Wed, Oct 3, 2018
RHEL: Route network packets to go out via the same interface they came in
Viewed 2729 times since Sat, Jun 2, 2018