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 stunnel with systemd? stunnel
Viewed 12135 times since Thu, Jan 16, 2020
systemd Auto-restart a crashed service in systemd
Viewed 4716 times since Fri, Jan 17, 2020
RHEL: Remove existing SAN LUNs
Viewed 15493 times since Sat, Jun 2, 2018
Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting
Viewed 17211 times since Wed, May 30, 2018
VMWare tools free
Viewed 10396 times since Mon, Jul 16, 2018
An easier way to manage disk decryption at boot with Red Hat Enterprise Linux 7.5 using NBDE
Viewed 9747 times since Mon, Aug 6, 2018
Linux nslookup Command Examples for DNS Lookup
Viewed 10319 times since Sat, Sep 29, 2018
awk printf
Viewed 17581 times since Wed, Aug 19, 2020
Tropienie pożeracza dysku
Viewed 3121 times since Thu, May 24, 2018
Linux Cluster Tutorial
Viewed 3053 times since Sat, Sep 29, 2018