OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu

Jak sprawdzić, czy klucz prywatny pasuje do wydanego certyfikatu? Powinny posiadać identyczny skrót SHA256:

openssl rsa -noout -modulus -in kluczdomeny.key 2> /dev/null | sha256sum -
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -
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
There are no attachments for this article.
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
RHEL: iSCSI target/initiator configuration on RHEL6
Viewed 1548 times since Sat, Jun 2, 2018
watchdog How to restart a process out of crontab on a Linux/Unix
Viewed 3200 times since Tue, Jul 31, 2018
LVM: Move allocated PE between Physical Volumes
Viewed 1431 times since Sat, Jun 2, 2018
stunnel How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
Viewed 157 times since Sun, Dec 6, 2020
Set Up SSH Tunneling on a Linux / Unix / BSD Server To Bypass NAT
Viewed 476 times since Fri, May 15, 2020
high swap space utilization in LINUX
Viewed 868 times since Fri, Jul 13, 2018
RHEL7: How to get started with Firewalld.
Viewed 1999 times since Wed, May 22, 2019
10 Linux nslookup Command Examples for DNS Lookup
Viewed 768 times since Sun, Sep 30, 2018
Prosty skaner portów TCP w bash
Viewed 1226 times since Thu, May 24, 2018
Linux Kernel /etc/sysctl.conf Security Hardening
Viewed 2522 times since Fri, Aug 3, 2018