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
Linux Cluster Tutorial
Viewed 2708 times since Sat, Sep 29, 2018
ZPOOL: Detach a submirror from a mirrored zpool
Viewed 3292 times since Sun, Jun 3, 2018
Linux 20 Netstat Commands for Linux Network Management
Viewed 10240 times since Mon, Sep 21, 2020
RHCS: Configure an active/backup pacemaker cluster
Viewed 9841 times since Sun, Jun 3, 2018
Learn how to align an SSD on Linux
Viewed 13558 times since Fri, May 15, 2020
Fake A Hollywood Hacker Screen in Linux Terminal linux FUN
Viewed 7420 times since Thu, Apr 18, 2019
LOGROTATE – ARCHIWIAZACJA LOGÓW
Viewed 2595 times since Fri, Nov 30, 2018
Linux - How to monitor memory usage
Viewed 3624 times since Fri, Jun 8, 2018
How to Migrate from RHEL 8 to CentOS 8
Viewed 3802 times since Fri, May 15, 2020
tcpdump usage examples
Viewed 2873 times since Fri, Jul 27, 2018