Skip to content

Getting "Ill-formed input" in ostree sign #3345

Answered by prydom
ganjiii3 asked this question in Q&A
Discussion options

You must be logged in to vote

You can use this script I wrote, that I mostly sourced from OSTree's tests. In particular this test:

ostree/tests/libtest.sh

Lines 760 to 776 in 111a45f

gen_ed25519_keys ()
{
# Generate private key in PEM format
pemfile="$(mktemp -p ${test_tmpdir} ed25519_XXXXXX.pem)"
openssl genpkey -algorithm ed25519 -outform PEM -out "${pemfile}"
# Based on: http://openssl.6102.n7.nabble.com/ed25519-key-generation-td73907.html
# Extract the private and public parts from generated key.
ED25519PUBLIC="$(openssl pkey -outform DER -pubout -in ${pemfile} | tail -c 32 | base64)"
ED25519SEED="$(openssl pkey -outform DER -in ${pemfile} | tail -c 32 | base64

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ganjiii3
Comment options

Answer selected by ganjiii3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants