Skip to content

Instantly share code, notes, and snippets.

@stokito
Created June 8, 2024 22:18
Show Gist options
  • Save stokito/7d2570d686e1e884a82eec2826f346af to your computer and use it in GitHub Desktop.
Save stokito/7d2570d686e1e884a82eec2826f346af to your computer and use it in GitHub Desktop.

Revisions

  1. stokito created this gist Jun 8, 2024.
    9 changes: 9 additions & 0 deletions sign.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    certtool --generate-privkey --key-type=ed25519 --outfile privkey.pem

    certtool --generate-self-signed --load-privkey privkey.pem --outfile cert.pem

    certtool --p7-detached-sign --load-certificate cert.pem --load-privkey privkey.pem --infile msg.txt --outfile msg.txt.p7s

    certtool --p7-info --infile msg.txt.p7s

    certtool --p7-verify --load-certificate cert.pem --infile msg.txt.p7s --load-data msg.txt