summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-commit.c
diff options
context:
space:
mode:
authorDenis Pynkin <denis.pynkin@collabora.com>2019-08-20 00:56:27 +0300
committerDenis Pynkin <denis.pynkin@collabora.com>2020-03-25 15:23:54 +0300
commit4b9232b1fe46cf84ba787336eb0aaa4418e96698 (patch)
tree5c1aed74e19e5836319e88ae508622613d94f91e /src/ostree/ot-builtin-commit.c
parent0b55db9b2fad6d48216e130386a4d6980a336614 (diff)
downloadostree-4b9232b1fe46cf84ba787336eb0aaa4418e96698.tar.gz
builtin/sign: remove libsodium-specific code
Use only common sign API without libsoduim parts. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Diffstat (limited to 'src/ostree/ot-builtin-commit.c')
-rw-r--r--src/ostree/ot-builtin-commit.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index 89ada19e..7d412639 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -32,11 +32,6 @@
#include "ostree-repo-private.h"
#include "ostree-libarchive-private.h"
#include "ostree-sign.h"
-#include "ostree-sign-dummy.h"
-#if defined(HAVE_LIBSODIUM)
-#include "ostree-sign-ed25519.h"
-#include <sodium.h>
-#endif
static char *opt_subject;
static char *opt_body;
@@ -864,23 +859,13 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio
{
secret_key = g_variant_new_string (keyid);
}
-#if defined(HAVE_LIBSODIUM)
else if (!g_strcmp0 (ostree_sign_get_name (sign), "ed25519"))
{
gsize key_len = 0;
g_autofree guchar *key = g_base64_decode (keyid, &key_len);
- if ( key_len != crypto_sign_SECRETKEYBYTES)
- {
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- "Invalid KEY '%s'", keyid);
-
- goto out;
- }
-
secret_key = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, key, key_len, sizeof(guchar));
}
-#endif
if (!ostree_sign_set_sk (sign, secret_key, error))
goto out;