Page History
...
This document describes how to check the signature of a file signed with an X.509 certificate from the command line using OpenSSL.
The examples use EC private keys onlyPrivate Keys.
Extracting the Public Key from the X.509 Certificate
To check a signature with OpenSSL use the public key Public Key related to the private key Private Key the given file was signed with. Extract the public key Public Key to the pubkey.pem
file from the given certificate.pem
X.509 certificate file.
...
In this step the test.txt
file is signed with the privkey.pem
private key Private Key file. The binary signature is stored to the test.txt.sig
file.
...
In this step the pubkey.pem
public key Public Key file is used to check if the test.txt.sig
signature file matches the test.txt
file.
...
Possible results are
Verified OK
- The public key Public Key and signature for the signed file match.
Verification Failure
- The public key Public Key and signature for the signed file do not match.
...