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 get IP and MAC address of ethernet adapter in Linux
Viewed 2560 times since Fri, Jun 8, 2018
Jak wygenerować silne hasła jednorazowe w Linuksie?
Viewed 2208 times since Thu, May 24, 2018
Using stunnel and TinyProxy to obfuscate HTTP traffic
Viewed 6601 times since Fri, Sep 28, 2018
20 IPtables Examples For New SysAdmins
Viewed 2052 times since Fri, May 15, 2020
ZFS: Create a new zfs filesystem
Viewed 2451 times since Sun, Jun 3, 2018
red hat 7 tmpfiles service
Viewed 1709 times since Thu, Oct 11, 2018
How to use yum-cron to automatically update RHEL/CentOS Linux
Viewed 2550 times since Wed, Oct 17, 2018
linux ssh How to Hide the OpenSSH Version Details when Telnet to Port 22
Viewed 4466 times since Wed, Apr 22, 2020
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 87181 times since Thu, Jun 21, 2018
LVM: Reduce an existing Volume Group by removing one of its disks
Viewed 2409 times since Sat, Jun 2, 2018