Skip to content

Commit

Permalink
sign: Fix typo in error messages and comments
Browse files Browse the repository at this point in the history
Signed-off-by: Daiki Ueno <[email protected]>
  • Loading branch information
ueno committed Aug 13, 2024
1 parent 28c184f commit 1cc222e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion man/ostree-sign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
<listitem><para><filename>/etc/ostree/trusted.ed25519.d</filename></para></listitem>
<listitem><para><filename>/etc/ostree/revoked.ed25519.d</filename></para></listitem>
<listitem><para><filename>/usr/share/ostree/trusted.ed25519.d</filename></para></listitem>
<listitem><para><filename>/usr/share/ostree/rvokeded.ed25519.d</filename></para></listitem>
<listitem><para><filename>/usr/share/ostree/revoked.ed25519.d</filename></para></listitem>
</itemizedlist>
</para>
</refsect1>
Expand Down
4 changes: 2 additions & 2 deletions src/libostree/ostree-sign-ed25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/libotcore/otcore-ed25519-verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test-signed-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit 1cc222e

Please sign in to comment.