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.
GnuTLS sign and verification
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