This is similar to ostree_sign_data() but for the old gpg code. Flatpak will need this to reproduce a signed summary.