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
Manage SSH Key File With Passphrase
Viewed 2391 times since Tue, Mar 5, 2019
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 6703 times since Thu, Apr 18, 2019
3 Ways to Check Linux Kernel Version in Command Line
Viewed 11776 times since Fri, Apr 19, 2019
LVM: Remove a Filesystem / Logical Volume
Viewed 2722 times since Sat, Jun 2, 2018
Need to set up yum repository for locally-mounted DVD on Red Hat Enterprise Linux 7
Viewed 3294 times since Mon, Oct 29, 2018
How to enable Proxy Settings for Yum Command on RHEL / CentOS Servers
Viewed 12794 times since Thu, Jul 19, 2018
How to do a Filesystem Resize (ext3/ext4) on Redhat running on VMware
Viewed 11145 times since Wed, Jul 25, 2018
How To Use the Linux Auditing System on CentOS 7
Viewed 4103 times since Fri, Apr 5, 2019
Red Hat Cluster Tutorial
Viewed 2219 times since Sun, Jun 3, 2018
RHCS6: Create a new Logical Volume / Global Filesystem 2 (GFS2)
Viewed 2397 times since Sun, Jun 3, 2018