$ openssl req -x509 -nodes -newkey rsa:1024 -keyout keyfile.key -out certificate.cer
$ echo "hello!" > data.txt
$ openssl smime -sign -md sha1 \
> -binary -nocerts -noattr \
> -in data.txt -out data.txt.signed -outform der \
> -inkey keyfile.key \
> -signer certificate.cer
$ openssl asn1parse -inform der -in data.txt.signed
$ hexdump -C data.txt
$ xxd -p data.txt.signed
$ xxd -p data.txt.signed > data.txt.signed.hex
Created
October 21, 2015 23:16
-
-
Save diorahman/22e763046be04da15b7f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks this was very helpful for me. Any idea why this creates the PKCS#7 format even though the
-pk7out
argument is not used?