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
How To Create a Linux Swap File
Viewed 2047 times since Fri, Jun 8, 2018
Use inotify-tools on CentOS 7 or RHEL 7 to watch files and directories for events
Viewed 13325 times since Fri, Jul 27, 2018
RHEL: How to rebuild and/or patch a RPM package
Viewed 7920 times since Sat, Jun 2, 2018
Linux Screen
Viewed 1702 times since Sat, Jun 2, 2018
Installing and Configuring stunnel on CentOS 6
Viewed 3662 times since Fri, Sep 28, 2018
Turbocharge PuTTY with 12 Powerful Add-Ons – Software for Geeks #3
Viewed 14052 times since Sun, Sep 30, 2018
Tcpdump Examples Linux
Viewed 5475 times since Fri, Nov 16, 2018
HOWTO: Use SSL/port 465 in smarthost stunnel
Viewed 3291 times since Fri, Sep 28, 2018
Secure Secure Shell
Viewed 9883 times since Fri, Aug 21, 2020
Linux Audit The Linux security blog about Auditing, Hardening, and Compliance lynis
Viewed 1594 times since Thu, Jan 16, 2020