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
LVM: Managing snapshots
Viewed 7682 times since Sat, Jun 2, 2018
stunnel basics and pki standards
Viewed 9398 times since Fri, Sep 28, 2018
Logowanie za pomocą kluczy Secure Shell
Viewed 2887 times since Thu, May 24, 2018
Odpalenie polecenia tylko na jedną godzinę
Viewed 2769 times since Thu, May 24, 2018
systemd Auto-restart a crashed service in systemd
Viewed 3107 times since Fri, Jan 17, 2020
SSH: Execute Remote Command or Script – Linux
Viewed 2344 times since Mon, Feb 18, 2019
How to automate SSH login with password? ssh autologin
Viewed 2647 times since Fri, Jun 8, 2018
Linux Audit The Linux security blog about Auditing, Hardening, and Compliance lynis
Viewed 1993 times since Thu, Jan 16, 2020
Epoch & Unix Timestamp Conversion Tools
Viewed 61955 times since Fri, Jun 22, 2018
RHEL: Create a local RPM repository
Viewed 11109 times since Sun, May 27, 2018