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
ZPOOL: Create a new zpool for zfs filesystems
Viewed 2378 times since Sun, Jun 3, 2018
RHEL: How to change a USER/GROUP UID/GID and all owned files
Viewed 23214 times since Sat, Jun 2, 2018
Exclude multiple files and directories with rsync
Viewed 2686 times since Wed, Oct 31, 2018
SPRAWDZONA KONFIGURACJA RSYSLOG I LOGROTATE, JAKO ZEWNĘTRZNEGO SERWERA SYSLOG
Viewed 3965 times since Fri, Nov 30, 2018
HowTo: Create CSR using OpenSSL Without Prompt (Non-Interactive)
Viewed 14275 times since Mon, Feb 18, 2019
LVM: Remove a Filesystem / Logical Volume
Viewed 2724 times since Sat, Jun 2, 2018
How to Register and Enable Red Hat Subscription, Repositories and Updates for RHEL 7.0 Server
Viewed 13144 times since Mon, Oct 29, 2018
How to do a Filesystem Resize (ext3/ext4) on Redhat running on VMware
Viewed 11146 times since Wed, Jul 25, 2018
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 6374 times since Sat, Jun 2, 2018
LVM: Reduce an existing Logical Volume / Filesystem
Viewed 3695 times since Sat, Jun 2, 2018