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 Linux Network Statistics Tools / Commands
Viewed 7582 times since Mon, Sep 21, 2020
LVM basic
Viewed 1224 times since Sat, Jun 2, 2018
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 4746 times since Sat, Jun 2, 2018
RHEL: Rename a network interface on RHEL 7
Viewed 7287 times since Sat, Jun 2, 2018
Manage Linux Password Expiration and Aging Using chage
Viewed 2961 times since Tue, Sep 11, 2018
Moving SSL Certificate from IIS to Apache
Viewed 897 times since Mon, Feb 18, 2019
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 3902 times since Thu, Apr 18, 2019
Inxi – A Powerful Feature-Rich Commandline System Information Tool for Linux
Viewed 17825 times since Sat, Jun 2, 2018
Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting
Viewed 13530 times since Wed, May 30, 2018
RHEL: Back-up/Replicate a partition table
Viewed 2046 times since Sun, May 27, 2018