From 1cc222e86b18c4c40b313e473caa55af105aff3e Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 12 Jul 2024 15:29:58 +0900 Subject: [PATCH] sign: Fix typo in error messages and comments Signed-off-by: Daiki Ueno --- man/ostree-sign.xml | 2 +- src/libostree/ostree-sign-ed25519.c | 4 ++-- src/libotcore/otcore-ed25519-verify.c | 2 +- tests/test-signed-commit.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/ostree-sign.xml b/man/ostree-sign.xml index eb63f7ff83..508a6ca22b 100644 --- a/man/ostree-sign.xml +++ b/man/ostree-sign.xml @@ -81,7 +81,7 @@ License along with this library. If not, see . /etc/ostree/trusted.ed25519.d /etc/ostree/revoked.ed25519.d /usr/share/ostree/trusted.ed25519.d - /usr/share/ostree/rvokeded.ed25519.d + /usr/share/ostree/revoked.ed25519.d diff --git a/src/libostree/ostree-sign-ed25519.c b/src/libostree/ostree-sign-ed25519.c index 3dcff2ebb5..e0e3ac4613 100644 --- a/src/libostree/ostree-sign-ed25519.c +++ b/src/libostree/ostree-sign-ed25519.c @@ -103,7 +103,7 @@ validate_length (gsize found, gsize expected, GError **error) return TRUE; return glnx_throw ( error, "Ill-formed input: expected %" G_GSIZE_FORMAT " bytes, got %" G_GSIZE_FORMAT " bytes", - found, expected); + expected, found); } static gboolean @@ -152,7 +152,7 @@ ostree_sign_ed25519_data (OstreeSign *self, GBytes *data, GBytes **signature, if (!pkey) { EVP_MD_CTX_free (ctx); - return glnx_throw (error, "openssl: Failed to initialize ed5519 key"); + return glnx_throw (error, "openssl: Failed to initialize ed25519 key"); } size_t len; diff --git a/src/libotcore/otcore-ed25519-verify.c b/src/libotcore/otcore-ed25519-verify.c index 1c0ec2b83e..24f173b445 100644 --- a/src/libotcore/otcore-ed25519-verify.c +++ b/src/libotcore/otcore-ed25519-verify.c @@ -97,7 +97,7 @@ otcore_validate_ed25519_signature (GBytes *data, GBytes *public_key, GBytes *sig if (!pkey) { EVP_MD_CTX_free (ctx); - return glnx_throw (error, "openssl: Failed to initialize ed5519 key"); + return glnx_throw (error, "openssl: Failed to initialize ed25519 key"); } if (EVP_DigestVerifyInit (ctx, NULL, NULL, NULL, pkey) != 0 && EVP_DigestVerify (ctx, signature_buf, OSTREE_SIGN_ED25519_SIG_SIZE, diff --git a/tests/test-signed-commit.sh b/tests/test-signed-commit.sh index cf1cd1c852..73218528ce 100755 --- a/tests/test-signed-commit.sh +++ b/tests/test-signed-commit.sh @@ -101,7 +101,7 @@ ${CMD_PREFIX} ostree --repo=${test_tmpdir}/repo sign --verify --sign-type=ed255 ${CMD_PREFIX} ostree --repo=${test_tmpdir}/repo sign --verify --sign-type=ed25519 ${COMMIT} $(gen_ed25519_random_public) $(gen_ed25519_random_public) ${PUBLIC} $(gen_ed25519_random_public) $(gen_ed25519_random_public) echo "ok ed25519 signature verified" -# Check if we able to use all available modules to sign the same commit +# Check if we are able to use all available modules to sign the same commit echo "Unsigned commit for multi-sign" >> file.txt ${CMD_PREFIX} ostree --repo=${test_tmpdir}/repo commit -b main -s 'Unsigned commit' COMMIT="$(ostree --repo=${test_tmpdir}/repo rev-parse main)"