From 4f124effac00d61130d47cb1c222e547abd1cdfd Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Wed, 21 Feb 2024 14:37:23 +0100 Subject: [PATCH] Update circleci, metadata, desktop file and update cli code. fixes #349 --- .circleci/config.yml | 6 +++--- data/com.github.paolostivanin.OTPClient.appdata.xml | 6 +----- data/com.github.paolostivanin.OTPClient.desktop | 2 +- src/cli/exec-action.c | 2 +- src/common/common.c | 6 +++--- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1fa70338..09807970 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,9 @@ version: 2.0 jobs: - ubuntu2004: + ubuntu2304: docker: - - image: ubuntu:20.04 + - image: ubuntu:23.04 steps: - checkout - run: apt update && DEBIAN_FRONTEND=noninteractive apt -y install git gcc clang cmake libgcrypt20-dev libgtk-3-dev libzip-dev libjansson-dev libpng-dev libzbar-dev libprotobuf-c-dev libsecret-1-dev uuid-dev libprotobuf-dev libqrencode-dev @@ -50,7 +50,7 @@ workflows: version: 2 build: jobs: - - ubuntu2004 + - ubuntu2304 - ubuntuLatestRolling - debianLatestStable - fedoraLatestStable diff --git a/data/com.github.paolostivanin.OTPClient.appdata.xml b/data/com.github.paolostivanin.OTPClient.appdata.xml index ba2dd639..02318ce8 100644 --- a/data/com.github.paolostivanin.OTPClient.appdata.xml +++ b/data/com.github.paolostivanin.OTPClient.appdata.xml @@ -5,7 +5,7 @@ CC-BY-4.0 GPL-3.0+ OTPClient - GTK+ application for managing TOTP and HOTP tokens with built-in encryption. + Application for managing TOTP/HOTP tokens with built-in encryption otp @@ -561,8 +561,4 @@ - - workstation - mobile - diff --git a/data/com.github.paolostivanin.OTPClient.desktop b/data/com.github.paolostivanin.OTPClient.desktop index 701c859e..3e09b6c0 100644 --- a/data/com.github.paolostivanin.OTPClient.desktop +++ b/data/com.github.paolostivanin.OTPClient.desktop @@ -2,7 +2,7 @@ Type=Application Exec=otpclient Icon=com.github.paolostivanin.OTPClient -Keywords=otp;totp;hotp; +Keywords=otp;totp;hotp;2fa Terminal=false Name=OTPClient Comment=GTK+ TOTP and HOTP client diff --git a/src/cli/exec-action.c b/src/cli/exec-action.c index 3626cb04..d9065833 100644 --- a/src/cli/exec-action.c +++ b/src/cli/exec-action.c @@ -120,7 +120,7 @@ gboolean exec_action (CmdlineOpts *cmdline_opts, } } exported_file_path = g_build_filename (export_directory, export_pwd != NULL ? "aegis_exports.json.aes" : "aegis_exports.json", NULL); - ret_msg = export_aegis (exported_file_path, db_data->json_data, export_pwd); + ret_msg = export_aegis (exported_file_path, export_pwd, db_data->json_data); gcry_free (export_pwd); exported = TRUE; } diff --git a/src/common/common.c b/src/common/common.c index 08c544e8..3144b192 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -473,7 +473,7 @@ get_data_from_encrypted_backup (const gchar *path, GFileInputStream *in_stream, GError **err) { - gint32 salt_size, iv_size, tag_size; + gint32 salt_size = 0, iv_size = 0, tag_size = 0; switch (provider) { case ANDOTP: salt_size = iv_size = ANDOTP_IV_SALT; @@ -513,7 +513,7 @@ get_data_from_encrypted_backup (const gchar *path, } gsize enc_buf_size; - gint32 offset; + gint32 offset = 0; switch (provider) { case ANDOTP: // 4 is the size of iterations (int32) @@ -553,7 +553,7 @@ get_data_from_encrypted_backup (const gchar *path, g_object_unref (in_stream); g_object_unref (in_file); - guchar *derived_key; + guchar *derived_key = NULL; switch (provider) { case ANDOTP: derived_key = get_andotp_derived_key (password, salt, andotp_be_iterations);