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.

0 (0)
Article Rating (No 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 accurately determine when the system was booted
Viewed 469 times since Wed, Oct 3, 2018
ZPOOL: Remove an existing zpool
Viewed 585 times since Sun, Jun 3, 2018
What Is /dev/shm And Its Practical Usage
Viewed 580 times since Tue, Mar 12, 2019
OEL 7 – How to disable IPv6 on Oracle Linux 7
Viewed 3394 times since Fri, Aug 3, 2018
RHEL: Rebuilding the initial ramdisk image
Viewed 1484 times since Sat, Jun 2, 2018
red hat 7 tmpfiles service
Viewed 419 times since Thu, Oct 11, 2018
Installing and Configuring stunnel on CentOS 6
Viewed 873 times since Fri, Sep 28, 2018
LVM: Reduce SWAP size by removing a Logical Volume
Viewed 611 times since Sat, Jun 2, 2018
RHEL: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 898 times since Sat, Jun 2, 2018
Yum Update: DB_RUNRECOVERY Fatal error, run database recovery
Viewed 276 times since Fri, Jan 17, 2020