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
RHEL7: Configure automatic updates.
Viewed 708 times since Wed, Oct 17, 2018
ubuntu How to Reset Forgotten Passwords in Ubuntu 16.04
Viewed 232 times since Tue, Dec 8, 2020
OEL 7 – How to disable IPv6 on Oracle Linux 7 – Follow Up
Viewed 1182 times since Wed, Jul 25, 2018
Do you Know These 5 Use of V$session View ?
Viewed 10390 times since Thu, Jun 21, 2018
Linux Find Large Files
Viewed 1003 times since Mon, Oct 29, 2018
Exclude multiple files and directories with rsync
Viewed 757 times since Wed, Oct 31, 2018
Using Official Redhat DVD as repository
Viewed 1157 times since Mon, Oct 29, 2018
Linux File Systems (mkfs, mount, fstab) ext4
Viewed 1142 times since Sat, Jun 2, 2018
RHEL: udev rules basics
Viewed 1706 times since Sat, Jun 2, 2018
How to stop and disable auditd on RHEL 7
Viewed 11952 times since Tue, Aug 6, 2019