OpenSSLfails on signature verification with “Unknown Option” error
up vote
1
down vote
favorite
I have three files:
- test.json
- public.pem
- test.json.sign (Which is the signature of test.json with a private key)
I need to verify this signature. I use the following command
dgst -sha256 -sign pub.key -signature <signature filename> <data file>
When I try this command it gives me "unable to load key file" error.
What is the problem?
P.S: I googled the problem and I found a solution on this website here
It says I need to run the following command first
openssl x509 -pubkey -noout -in cert.pem > pubkey.pem
But when I run this command it gives me "unknown option" error!
openssl
add a comment |
up vote
1
down vote
favorite
I have three files:
- test.json
- public.pem
- test.json.sign (Which is the signature of test.json with a private key)
I need to verify this signature. I use the following command
dgst -sha256 -sign pub.key -signature <signature filename> <data file>
When I try this command it gives me "unable to load key file" error.
What is the problem?
P.S: I googled the problem and I found a solution on this website here
It says I need to run the following command first
openssl x509 -pubkey -noout -in cert.pem > pubkey.pem
But when I run this command it gives me "unknown option" error!
openssl
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have three files:
- test.json
- public.pem
- test.json.sign (Which is the signature of test.json with a private key)
I need to verify this signature. I use the following command
dgst -sha256 -sign pub.key -signature <signature filename> <data file>
When I try this command it gives me "unable to load key file" error.
What is the problem?
P.S: I googled the problem and I found a solution on this website here
It says I need to run the following command first
openssl x509 -pubkey -noout -in cert.pem > pubkey.pem
But when I run this command it gives me "unknown option" error!
openssl
I have three files:
- test.json
- public.pem
- test.json.sign (Which is the signature of test.json with a private key)
I need to verify this signature. I use the following command
dgst -sha256 -sign pub.key -signature <signature filename> <data file>
When I try this command it gives me "unable to load key file" error.
What is the problem?
P.S: I googled the problem and I found a solution on this website here
It says I need to run the following command first
openssl x509 -pubkey -noout -in cert.pem > pubkey.pem
But when I run this command it gives me "unknown option" error!
openssl
openssl
edited Nov 17 at 23:37
JakeGould
30.7k1093135
30.7k1093135
asked Nov 17 at 23:29
user964804
61
61
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40
add a comment |
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.
openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.
openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376339%2fopensslfails-on-signature-verification-with-unknown-option-error%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
This could be a character encoding issue. Look at this answer. Or just try it without the file output like this.
openssl x509 -pubkey -noout -in cert.pem
– JakeGould
Nov 17 at 23:40