Skip to content

Commit

Permalink
Merge pull request #353 from paolostivanin/dev
Browse files Browse the repository at this point in the history
Release 3.5.2
  • Loading branch information
paolostivanin authored Mar 8, 2024
2 parents dc157db + 79e4dca commit bc18549
Show file tree
Hide file tree
Showing 15 changed files with 345 additions and 240 deletions.
26 changes: 8 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
version: 2.0

jobs:
ubuntu2404:
docker:
- image: ubuntu:24.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
- run: chmod +x .ci/install_deps.sh && .ci/install_deps.sh
- run: chmod +x .ci/install_otpclient.sh && .ci/install_otpclient.sh

ubuntuLatestRolling:
archlinux:
docker:
- image: ubuntu:rolling
- image: archlinux:latest
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
- run: pacman -Syu --noconfirm && pacman -S --noconfirm pkg-config git gtk3 libgcrypt zbar gcc clang cmake make libzip jansson libpng protobuf-c libsecret util-linux-libs qrencode
- run: chmod +x .ci/install_deps.sh && .ci/install_deps.sh
- run: chmod +x .ci/install_otpclient.sh && .ci/install_otpclient.sh

Expand All @@ -37,21 +28,20 @@ jobs:
- run: chmod +x .ci/install_deps.sh && .ci/install_deps.sh
- run: chmod +x .ci/install_otpclient.sh && .ci/install_otpclient.sh

archlinux:
ubuntu2404:
docker:
- image: archlinux:latest
- image: ubuntu:24.04
steps:
- checkout
- run: pacman -Syu --noconfirm && pacman -S --noconfirm pkg-config git gtk3 libgcrypt zbar gcc clang cmake make libzip jansson libpng protobuf-c libsecret util-linux-libs qrencode
- 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
- run: chmod +x .ci/install_deps.sh && .ci/install_deps.sh
- run: chmod +x .ci/install_otpclient.sh && .ci/install_otpclient.sh

workflows:
version: 2
build:
jobs:
- ubuntu2404
- ubuntuLatestRolling
- archlinux
- debianLatestStable
- fedoraLatestStable
- archlinux
- ubuntu2404
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.16)
project(OTPClient VERSION "3.5.1" LANGUAGES "C")
project(OTPClient VERSION "3.5.2" LANGUAGES "C")
include(GNUInstallDirs)

configure_file("src/common/version.h.in" "version.h")
Expand Down
13 changes: 12 additions & 1 deletion data/com.github.paolostivanin.OTPClient.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,18 @@
</content_rating>

<releases>
<release version="3.5.0" date="2024-03-05">
<release version="3.5.2" date="2024-03-08">
<description>
<p>OTPClient 3.5.2 brings some small improvements:</p>
<ul>
<li>NEW: add possibility to export plain/encrypted Authenticator Pro/2FAS backups using the CLI</li>
<li>FIX: improve popover layout</li>
<li>FIX: exporting plaing Aegis via CLI</li>
<li>FIX: cleanup code</li>
</ul>
</description>
</release>
<release version="3.5.1" date="2024-03-05">
<description>
<p>OTPClient 3.5.1 brings a small improvement and some code clean-up:</p>
<ul>
Expand Down
26 changes: 26 additions & 0 deletions src/cli/exec-action.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,32 @@ gboolean exec_action (CmdlineOpts *cmdline_opts,
gcry_free (export_pwd);
exported = TRUE;
}
if (g_ascii_strcasecmp (cmdline_opts->export_type, "twofas_plain") == 0 || g_ascii_strcasecmp (cmdline_opts->export_type, "twofas_encrypted") == 0) {
if (g_ascii_strcasecmp (cmdline_opts->export_type, "twofas_encrypted") == 0) {
export_pwd = get_pwd (_("Type the export encryption password: "));
if (export_pwd == NULL) {
free_dbdata (db_data);
return FALSE;
}
}
exported_file_path = g_build_filename (export_directory, export_pwd != NULL ? "twofas_encrypted_v4.2fas" : "twofas_plain_v4.2fas", NULL);
ret_msg = export_twofas (exported_file_path, export_pwd, db_data->json_data);
gcry_free (export_pwd);
exported = TRUE;
}
if (g_ascii_strcasecmp (cmdline_opts->export_type, "authpro_plain") == 0 || g_ascii_strcasecmp (cmdline_opts->export_type, "authpro_encrypted") == 0) {
if (g_ascii_strcasecmp (cmdline_opts->export_type, "authpro_encrypted") == 0) {
export_pwd = get_pwd (_("Type the export encryption password: "));
if (export_pwd == NULL) {
free_dbdata (db_data);
return FALSE;
}
}
exported_file_path = g_build_filename (export_directory, export_pwd != NULL ? "authpro_encrypted.bin" : "authpro_plain.json", NULL);
ret_msg = export_authpro (exported_file_path, export_pwd, db_data->json_data);
gcry_free (export_pwd);
exported = TRUE;
}
if (ret_msg != NULL) {
g_printerr (_("An error occurred while exporting the data: %s\n"), ret_msg);
g_free (ret_msg);
Expand Down
2 changes: 1 addition & 1 deletion src/cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ main (gint argc,
{ "show-next", 'n', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "Show also next OTP (to be used with --show, optional)", NULL},
{ "list", 'l', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "List all accounts and issuers for a given database.", NULL },
{ "export", 'e', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "Export a database.", NULL },
{ "type", 't', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, NULL, "The export type for the database. Must be either one of: andotp_plain, andotp_encrypted, freeotpplus, aegis, aegis_encrypted (to be used with --export, mandatory)", NULL },
{ "type", 't', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, NULL, "The export type for the database. Must be either one of: andotp_plain, andotp_encrypted, freeotpplus, aegis_plain, aegis_encrypted, twofas_plain, twofas_encrypted, authpro_plain, authpro_encrypted (to be used with --export, mandatory)", NULL },
#ifndef USE_FLATPAK_APP_FOLDER
{ "output-dir", 'o', G_OPTION_FLAG_NONE, G_OPTION_ARG_STRING, NULL, "The output directory (defaults to the user's home. To be used with --export, optional)", NULL },
#endif
Expand Down
Loading

0 comments on commit bc18549

Please sign in to comment.