-
-
Save kdkanishka/31f0cd88608fb1d39027aa75e3fe4074 to your computer and use it in GitHub Desktop.
How to make, show and verify binary signature with openssl.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
自己署名証明書の作成 | |
# Make key.pem and cert.pem | |
openssl req -new -days 365 -x509 -nodes -keyout key.pem -out cert.pem | |
証明書の内容の表示 | |
# Show cert.pem | |
openssl x509 -text -noout < cert.pem | |
署名ファイルの作成 | |
# Make signature | |
openssl smime -binary -sign -signer cert.pem -inkey key.pem -in manifest.json -out signature -outform DER | |
署名ファイルの内容の表示 | |
# Show signature | |
openssl asn1parse -inform der -in signature | |
署名の検証 | |
# Verify signature | |
openssl smime -verify -CAfile cert.pem -content manifest.json -in signature -inform DER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment