Following this guide I created a text file and signed it like so on Linux:
echo "Hello World" > sign.txt openssl dgst -sha256 -sign my_self_signe