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 do a Filesystem Resize (ext3/ext4) on Redhat running on VMware
Viewed 11523 times since Wed, Jul 25, 2018
List DNS records, nameservers of a domain from command line
Viewed 2468 times since Sun, Sep 30, 2018
20 Practical Examples of RPM Commands in Linux rpm
Viewed 8578 times since Mon, Feb 18, 2019
ZPOOL: Remove an existing zpool
Viewed 2784 times since Sun, Jun 3, 2018
logrotate Log Rotate Configuration
Viewed 3675 times since Sun, Jan 12, 2020
Tunnel SSH Connections Over SSL Using ‘Stunnel’ On Debian 7 / Ubuntu 13.10
Viewed 3973 times since Fri, Sep 28, 2018
How To Add Swap Space on Ubuntu 16.04
Viewed 2844 times since Fri, Jun 8, 2018
LVM: Rename root VG/LV
Viewed 8255 times since Sat, Jun 2, 2018
What Is /dev/shm And Its Practical Usage
Viewed 8708 times since Tue, Mar 12, 2019
linux ssh Remotely Initiated Reverse SSH Tunnel
Viewed 3781 times since Wed, Apr 22, 2020