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
Applescript: Run or Call a Shell Script
Viewed 4118 times since Tue, Aug 6, 2019
Używanie rsync poprzez Secure Shell
Viewed 41072 times since Thu, May 24, 2018
A Simple Guide to Oracle Cluster File System (OCFS2) using iSCSI on Oracle Cloud Infrastructure
Viewed 8177 times since Sat, Jun 2, 2018
How to remove CTRL-M (^M) characters from a file in Linux
Viewed 2494 times since Thu, Feb 7, 2019
Linux get the list of FC HBA’s and WWPN
Viewed 3152 times since Tue, May 22, 2018
How To Ping Specific Port Number
Viewed 3929 times since Mon, Jun 1, 2020
ZPOOL: Remove an existing zpool
Viewed 2214 times since Sun, Jun 3, 2018
How to enable automatic security updates on CentOS 7 with yum-cron
Viewed 2402 times since Fri, Oct 26, 2018
How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers
Viewed 12346 times since Thu, Jul 19, 2018
tcpdump
Viewed 8994 times since Fri, Jul 27, 2018