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
How to encrypt a partition with DM-Crypt LUKS on Linux
Viewed 9162 times since Fri, Jul 13, 2018
Linux Cluster Tutorial
Viewed 2914 times since Sat, Sep 29, 2018
20 Practical Examples of RPM Commands in Linux rpm
Viewed 9135 times since Mon, Feb 18, 2019
3 Ways to Check Linux Kernel Version in Command Line
Viewed 12799 times since Fri, Apr 19, 2019
INSTALACJA MIB SNMP W SYSTEMIE CENTOS/RHEL 6
Viewed 13754 times since Fri, Nov 30, 2018
Linux PAM configuration that allows or deny login via the sshd server
Viewed 2765 times since Wed, Oct 3, 2018
linux ssh How to Hide the OpenSSH Version Details when Telnet to Port 22
Viewed 7414 times since Wed, Apr 22, 2020
How to disable SSH cipher/ MAC algorithms for Linux and Unix
Viewed 51775 times since Fri, Aug 21, 2020
RHEL: Handling SCSI disks
Viewed 13841 times since Sun, May 27, 2018
Linux – Securing your important files with XFS extendend attributes
Viewed 8374 times since Wed, Jul 25, 2018