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
high swap space utilization in LINUX
Viewed 5192 times since Fri, Jul 13, 2018
ZFS: Snapshots and clones on zfs filesystems
Viewed 2044 times since Sun, Jun 3, 2018
LVM basic
Viewed 1224 times since Sat, Jun 2, 2018
OpenSSL: Find Out SSL Key Length – Linux Command Line
Viewed 2938 times since Mon, Feb 18, 2019
Understanding System auditing with auditd
Viewed 3861 times since Fri, Apr 5, 2019
Linux – How to check the exit status of several piped commands
Viewed 1977 times since Wed, Jul 25, 2018
RHEL : How to deal with “CLOSE_WAIT” and “TIME_WAIT” connection
Viewed 15991 times since Thu, Feb 14, 2019
RHEL: Resize/disable /dev/shm filesystem
Viewed 9843 times since Sun, May 27, 2018
Linux Network (TCP) Performance Tuning with Sysctl
Viewed 8361 times since Fri, Aug 3, 2018
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 3902 times since Thu, Apr 18, 2019