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 Use Systemctl to Manage Systemd Services and Units
Viewed 7583 times since Mon, Dec 7, 2020
How to find your System details using inxi
Viewed 3437 times since Sat, Jun 2, 2018
Installing and Configuring stunnel on CentOS 6
Viewed 4165 times since Fri, Sep 28, 2018
Linux Customizing Bash
Viewed 2177 times since Sun, Dec 6, 2020
Linux Screen
Viewed 2100 times since Sat, Jun 2, 2018
How to Configure ‘FirewallD’ in RHEL/CentOS 7 and Fedora 21
Viewed 10557 times since Wed, Oct 9, 2019
RHEL: Force system to prompt for password in Single User mode
Viewed 7456 times since Sat, Jun 2, 2018
List usernames instead of uids with the ps command for long usernames
Viewed 2438 times since Wed, Jul 25, 2018
RHEL: Checking HBAs
Viewed 14903 times since Sun, May 27, 2018
Linux: Disks diagnostic using smartctl
Viewed 15174 times since Wed, Jul 25, 2018