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
RHEL: Allowing users to ’su’ to "root" / Allowing ’root’ to login directly to the system using ’ssh’
Viewed 3984 times since Sat, Jun 2, 2018
OCFS2 Cluster File System Setup Guide in Linux
Viewed 8926 times since Sat, Jun 2, 2018
RHEL: XFS basic operations
Viewed 18256 times since Sat, Jun 2, 2018
A Quick and Practical Reference for tcpdump
Viewed 14247 times since Fri, Jul 27, 2018
Installing and Configuring an OCFS2 Clustered File System
Viewed 7154 times since Sat, Jun 2, 2018
How to recover error - Audit error: dispatch err (pipe full) event lost
Viewed 28636 times since Tue, Aug 6, 2019
RHEL: Route network packets to go out via the same interface they came in
Viewed 4474 times since Sat, Jun 2, 2018
List DNS records, nameservers of a domain from command line
Viewed 2866 times since Sun, Sep 30, 2018
RHEL: Rename a network interface on RHEL 7
Viewed 12279 times since Sat, Jun 2, 2018
Modifying the inode count for an ext2/ext3/ext4 file system
Viewed 18391 times since Fri, Sep 18, 2020