gpa.git
4 months agoUse the new gpgme_op_interact interface. master
Werner Koch [Wed, 13 Sep 2017 06:55:36 +0000 (08:55 +0200)]
Use the new gpgme_op_interact interface.

* src/gpgmeedit.c (CMP_STATUS): New macro.  Use this instead of the
direct integer compares.
(status_type_t): New type alias.  Use it instead of
gpgme_status_code_t.
(edit_fnc) [USE_GPGME_INTERACT]: Compare a against a string list.
(gpa_gpgme_edit_trust_start) [USE_GPGME_INTERACT]: Use the new API.
(gpa_gpgme_edit_expire_start) [USE_GPGME_INTERACT]: Ditto.
(gpa_gpgme_edit_sign_start) [USE_GPGME_INTERACT]: Ditto.
(gpa_gpgme_edit_passwd_start) [USE_GPGME_INTERACT]: Ditto.
(gpa_gpgme_card_edit_genkey_start) [USE_GPGME_INTERACT]: Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
4 months agoFix listing of algorithm/keysize in the subkey window.
Werner Koch [Wed, 13 Sep 2017 05:49:45 +0000 (07:49 +0200)]
Fix listing of algorithm/keysize in the subkey window.

* src/gpasubkeylist.c (gpa_subkey_list_set_key): Use the current
subkey.
--

GnuPG-bug-id: 3405
Signed-off-by: Werner Koch <wk@gnupg.org>
6 months agopo: czech translation update
Zdeněk Hataš [Thu, 13 Jul 2017 13:55:41 +0000 (15:55 +0200)]
po: czech translation update

8 months agoFix crash on filename conversion error
Andre Heinecke [Sun, 14 May 2017 12:39:57 +0000 (14:39 +0200)]
Fix crash on filename conversion error

* src/fileman.c (add_file): Handle conversion errors.

--
If g_filename_to_utf8 fails we now fall back to g_locale_to_utf8.
If this still does not work we fall back to g_filename_display_name
which replaces unconvertibale strings by question marks or unicode
markup.
Previously NULL pointer would be inserted as filenames, leading
to crashes later on.

This is especially important for windows where D&D files came
in System encoding as well as "Double clicked" or "Open With" files.
On windows filename_to_utf8 always assumes that the input is already
UTF-8, because it's stupid. (or because the GTK File Dialog returns
UTF-8 filenames) so the fallback to locale is especially important
here.

GnuPG-Bug-ID: T2185

9 months agow32: Make location of locale dir more flexible
Andre Heinecke [Thu, 13 Apr 2017 07:44:47 +0000 (09:44 +0200)]
w32: Make location of locale dir more flexible

* src/gpa.c (get_locale_dir): If installed under a bin subdirectory
strip this out of the locale path.

--
This fixes loading locales when GPA is installed under a bin
subdirectory like it is with GnuPG 2.1 and Gpg4win.

10 months agoChange license of card application modules to LGPLv3+/GPLv2+.
Werner Koch [Fri, 24 Feb 2017 12:20:36 +0000 (13:20 +0100)]
Change license of card application modules to LGPLv3+/GPLv2+.

All code was written by me and Moritz Schulte who was at that time an
employee of g10 Code GmbH.  I am CEO of that company.

Signed-off-by: Werner Koch <wk@gnupg.org>
11 months agoAdd mimetimes to gpa.desktop
Werner Koch [Thu, 9 Feb 2017 08:48:28 +0000 (09:48 +0100)]
Add mimetimes to gpa.desktop

--

Suggested-by: Olivier Mehani <shtrom@ssji.net>
Signed-off-by: Werner Koch <wk@gnupg.org>
13 months agoTypo fix in NEWS
Werner Koch [Thu, 1 Dec 2016 08:38:03 +0000 (09:38 +0100)]
Typo fix in NEWS

--

13 months agopo: czech translation update
Zdeněk Hataš [Mon, 21 Nov 2016 11:46:23 +0000 (12:46 +0100)]
po: czech translation update

13 months agoFix typo.
Andreas Rönnquist [Mon, 21 Nov 2016 17:49:48 +0000 (18:49 +0100)]
Fix typo.

--
Signed-off-by: Justus Winter <justus@g10code.com>
13 months agoPost release updates.
Werner Koch [Sat, 19 Nov 2016 11:09:57 +0000 (12:09 +0100)]
Post release updates.

--

13 months agoRelease 0.9.10 gpa-0.9.10
Werner Koch [Sat, 19 Nov 2016 10:56:57 +0000 (11:56 +0100)]
Release 0.9.10

13 months agopo: Auto update.
Werner Koch [Sat, 19 Nov 2016 10:55:19 +0000 (11:55 +0100)]
po: Auto update.

--

13 months agopo: Update German translation.
Werner Koch [Sat, 19 Nov 2016 10:41:08 +0000 (11:41 +0100)]
po: Update German translation.

--

13 months agopo: Add zh_CN translation
Werner Koch [Sat, 19 Nov 2016 10:37:29 +0000 (11:37 +0100)]
po: Add zh_CN translation

--

13 months agoFix some minor problems in original English strings
Andreas Rönnquist [Thu, 11 Dec 2014 06:13:05 +0000 (07:13 +0100)]
Fix some minor problems in original English strings

14 months agoFix make distcheck broken by last commit.
Werner Koch [Sat, 5 Nov 2016 20:53:45 +0000 (21:53 +0100)]
Fix make distcheck broken by last commit.

--

14 months agoAdd new tab to the key details with TOFU information.
Werner Koch [Sat, 5 Nov 2016 20:28:59 +0000 (21:28 +0100)]
Add new tab to the key details with TOFU information.

* src/gpa-tofu-list.c: New.
* src/gpa-tofu-list.h: New.
* src/Makefile.am (gpa_SOURCES): Add new files.
* src/gpa.h (ENABLE_TOFU_INFO): Define depending on GPGME version.
* src/keymanager.c (key_manager_selection_changed): List with tofu
info.
* src/convert.c (gpa_expiry_date_string): Factor code out to ...
(gpa_date_string): new.
* src/gpa-key-details.c: Include gpa-tofu-list.h.
(struct _GpaKeyDetails): Add fields tofu_list and tofu_page.
(gpa_key_details_finalize): Release tofu objects.
(build_tofu_page): New.
(ui_mode_changed): Call that.
(gpa_key_details_update): Add TOFU notebook page.

* src/gpa-key-details.c (details_page_fill_key): Move KeyID after the
fingerprint.

Signed-off-by: Werner Koch <wk@gnupg.org>
16 months agoRemove the keyid column from two lists.
Werner Koch [Fri, 16 Sep 2016 19:11:59 +0000 (21:11 +0200)]
Remove the keyid column from two lists.

* src/keylist.c (GPA_KEYLIST_COLUMN_KEYID): Remove.
(gpa_keylist_init): Remove corresponding entry.
(gpa_keylist_next): Remove keyid setting.
(search_keylist_function): Remove keyid searching.
(setup_columns): Don't fill keyid column.
* src/gpakeyselector.c: Include gtktools.h and convert.h.
(GPA_KEY_SELECTOR_COLUMN_KEYID): Renamed to
GPA_KEY_SELECTOR_COLUMN_CREATED.
(gpa_key_selector_init): Show Creation date instead of Keyid.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
17 months agoFix drag-and-drop.
Justus Winter [Mon, 18 Jul 2016 15:26:16 +0000 (17:26 +0200)]
Fix drag-and-drop.

* src/fileman.c (dnd_drop_handler): Instead of hard-coding the
position of the expected target (which may crash if the list is
shorter), look for the expected target in the list supplied by the
source window.

GnuPG-bug-id: 2413
Signed-off-by: Justus Winter <justus@g10code.com>
19 months agoMake the gpgme edito FSM more robust.
Werner Koch [Fri, 20 May 2016 14:31:45 +0000 (16:31 +0200)]
Make the gpgme edito FSM more robust.

* src/gpgmeedit.c (edit_fnc): Whitelist instead of blacklisting needed
status codes.
--

The old code broke every  time we added a new status code to gpg.
This way it is MUCH more robust.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoProvide an option to choose an alternate name for files that exist
Neal H. Walfield [Tue, 3 Nov 2015 21:09:54 +0000 (22:09 +0100)]
Provide an option to choose an alternate name for files that exist

* src/gpgmetools.c (check_overwriting): Change return type from a
boolean to a char *.  If the file exists, offer the user the option to
select a different file.  Return the file that is actually used.
(gpa_fopen): Take an additional parameter, FILENAME_USED.  Save the
filename returned by check_overwriting there.  Update users.
(gpa_open_output): Likewise.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 758

2 years agoFix segv when if build against gpgme 1.6.1.
Werner Koch [Fri, 11 Sep 2015 08:55:35 +0000 (10:55 +0200)]
Fix segv when if build against gpgme 1.6.1.

* src/gpasubkeylist.c (gpa_subkey_list_new): Remove one STRING column
for gpgme >= 1.6.1.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoAllow deletion of X.509 keys.
Werner Koch [Fri, 11 Sep 2015 08:53:59 +0000 (10:53 +0200)]
Allow deletion of X.509 keys.

* src/gpakeydeleteop.c (gpa_key_delete_operation_start): Set the
protocol before calling the delete function.
--

In the past this worked only if the context was already set to the
X.509 protocol.

GnuPG-bug-id: 2094

2 years agoPost release updates
Werner Koch [Wed, 9 Sep 2015 09:28:13 +0000 (11:28 +0200)]
Post release updates

--

2 years agoRelease 0.9.9 gpa-0.9.9
Werner Koch [Wed, 9 Sep 2015 09:18:40 +0000 (11:18 +0200)]
Release 0.9.9

2 years agoFix build problem for gpgme < 1.6.1
Werner Koch [Wed, 9 Sep 2015 09:17:38 +0000 (11:17 +0200)]
Fix build problem for gpgme < 1.6.1

* src/gpasubkeylist.c (SubkeyListColumn): Fix macro condition.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoPost release updates.
Werner Koch [Wed, 9 Sep 2015 08:39:58 +0000 (10:39 +0200)]
Post release updates.

--

2 years agoRelease 0.9.8 gpa-0.9.8
Werner Koch [Wed, 9 Sep 2015 07:47:45 +0000 (09:47 +0200)]
Release 0.9.8

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agopo: Auto-update
Werner Koch [Wed, 9 Sep 2015 07:44:11 +0000 (09:44 +0200)]
po: Auto-update

--

2 years agobuild: Use AC_PROG_MKDIR_P to silence autoconf warning.
Werner Koch [Wed, 9 Sep 2015 07:45:24 +0000 (09:45 +0200)]
build: Use AC_PROG_MKDIR_P to silence autoconf warning.

* m4/po.m4: Use modern macro.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agobuild: Update config.guess et al.
Werner Koch [Wed, 9 Sep 2015 07:46:03 +0000 (09:46 +0200)]
build: Update config.guess et al.

--

2 years agoDo not mention the now closed gpa-dev list.
Werner Koch [Tue, 8 Sep 2015 11:43:11 +0000 (13:43 +0200)]
Do not mention the now closed gpa-dev list.

--

2 years agoUse GnuPG 2.1 style pubkey algo format also for subkey lists.
Werner Koch [Mon, 31 Aug 2015 08:33:21 +0000 (10:33 +0200)]
Use GnuPG 2.1 style pubkey algo format also for subkey lists.

* src/gpasubkeylist.c (SUBKEY_SIZE): Define only for old gpgme
versions.
(gpa_subkey_list_new): Ditto for "Size".
(gpa_subkey_list_set_key): Use new algostr if possble.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoPrint the GnuPP 2.1 style pubkey algo string in key details.
Werner Koch [Sun, 30 Aug 2015 17:07:33 +0000 (19:07 +0200)]
Print the GnuPP 2.1 style pubkey algo string in key details.

* src/gpa-key-details.c (details_page_fill_key): Use new gpgme
function if available to print that string.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoTruncate user ids in some dialogs.
Werner Koch [Sun, 30 Aug 2015 13:45:19 +0000 (15:45 +0200)]
Truncate user ids in some dialogs.

* src/gpa.h (GPA_MAX_UID_WIDTH): New.
* src/gpawidgets.c (gpa_key_info_new): Truncate user ids and put the
full user id into a tooltip.  Add a fingerprint line.
* src/keysigndlg.c (gpa_key_sign_run_dialog): Ditto.
--

This helps to keep the window size at bay.  Without a trunctaion it
could happen that a dialog window gets larger then the screen and thus
hides the buttons.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoStart off with the clipboard instead of the file manager.
Werner Koch [Sun, 30 Aug 2015 11:50:34 +0000 (13:50 +0200)]
Start off with the clipboard instead of the file manager.

* src/gpa.c (main): Move default action setting after options
reading.  Set default action to clipboard unless we are in simple mode
and no key has yet been created.
* src/options.c (gpa_options_have_default_key): New.
* src/keymanager.c (key_manager_maybe_firsttime): New.
(key_manager_mapped): Use gpa_options_have_default_key.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoImprove error handling for the sign key command.
Werner Koch [Tue, 25 Aug 2015 13:04:25 +0000 (15:04 +0200)]
Improve error handling for the sign key command.

* src/gpgmeedit.c (parse_status_error): New.
(edit_fnc): Add method to send the default answer.
(edit_sign_fnc_transit): Send default answer for unknown prompts.
Take care of ERROR status in the SIGN_CONFIRM state.
--

This requires GnuPG 2.1.8 to work as desired.

Signed-off-by: Werner Koch <wk@gnupg.org>
2 years agoFix handling of the windows close button in confirmation dialogs.
Werner Koch [Thu, 22 Jan 2015 17:09:29 +0000 (18:09 +0100)]
Fix handling of the windows close button in confirmation dialogs.

* src/gpaexportserverop.c (confirm_send): Only act upon the Yes button.
* src/confdialog.c (gpa_configure_keyserver): Ditto.
* src/gpgmetools.c (check_overwriting): Ditto.
--

Checking for GTK_RESPONSE_NO was a bad idea because that catches only
the No button and no other events, like the window's close button.

GnuPG-bug-id: 1599

3 years agoPost release updates
Werner Koch [Fri, 12 Dec 2014 10:13:07 +0000 (11:13 +0100)]
Post release updates

--

3 years agoRelease 0.9.7 gpa-0.9.7
Werner Koch [Fri, 12 Dec 2014 07:47:48 +0000 (08:47 +0100)]
Release 0.9.7

3 years agopo: Auto update.
Werner Koch [Fri, 12 Dec 2014 07:45:47 +0000 (08:45 +0100)]
po: Auto update.

--

3 years agoReplace deprecated gpgme API for card access.
Werner Koch [Thu, 11 Dec 2014 08:59:33 +0000 (09:59 +0100)]
Replace deprecated gpgme API for card access.

* src/cardman.c: Use gpgme_op_assuan_transact_ext.
* src/cm-dinsig.c: Ditto.
* src/cm-geldkarte.c: Ditto.
* src/cm-netkey.c: Ditto.
* src/cm-openpgp.c: Ditto.
* src/cm-unknown.c: Ditto.

3 years agopo: Use the term "USB stick" for the backup message.
Werner Koch [Mon, 8 Dec 2014 16:39:28 +0000 (17:39 +0100)]
po: Use the term "USB stick" for the backup message.

--

3 years agoAdd another OpenPGP card vendor.
Werner Koch [Mon, 8 Dec 2014 10:46:01 +0000 (11:46 +0100)]
Add another OpenPGP card vendor.

--
To ease these things we should provide an API to read this list from
GnuPG.

3 years agoFloppy drives are pretty rare these days advice to use flash.
Werner Koch [Mon, 8 Dec 2014 10:36:33 +0000 (11:36 +0100)]
Floppy drives are pretty rare these days advice to use flash.

--

3 years agopo: Update the German translation.
Werner Koch [Mon, 8 Dec 2014 10:30:36 +0000 (11:30 +0100)]
po: Update the German translation.

--

3 years agoSupport sending keys with GnuPG 2.1.
Werner Koch [Mon, 8 Dec 2014 10:23:40 +0000 (11:23 +0100)]
Support sending keys with GnuPG 2.1.

* src/confdialog.c (gpa_configure_keyserver): New.
* src/gpa.c (main): Do no get a default keyserver for GnuPG 2.1.
* src/options.c (gpa_options_read_settings): Ditto.
* src/settingsdlg.c (save_settings): Do not set a default keyserver
for GnuPG 2.1
* src/gpaexportserverop.c (confirm_send): Ask to configure keyserver.
Support GnuPG 2.1.
(send_keys): New.
(gpa_export_server_operation_complete_export): Support GnuPG 2.1.

3 years agoUpdate card vendor list and fix one typo.
Werner Koch [Fri, 5 Dec 2014 09:58:47 +0000 (10:58 +0100)]
Update card vendor list and fix one typo.

--

3 years agoPost release updates.
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Post release updates.

--

3 years agoRelease 0.9.6. gpa-0.9.6
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Release 0.9.6.

3 years agoDo not create gzipped tarball.
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Do not create gzipped tarball.

* Makefile.am (AUTOMAKE_OPTIONS): Remove.
* configure.ac (AM_INIT_AUTOMAKE): Add options here.

3 years agopo: Auto-update
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
po: Auto-update

--

3 years agoGet rid of Gtk+ warning
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Get rid of Gtk+ warning

* src/server-access.c (wait_dialog): Remove GTK_DIALOG_NO_SEPARATOR.
--

The warning when used with GnupG < 2.1 was:

 Gtk-WARNING **: The GTK_DIALOG_NO_SEPARATOR flag cannot be used for
 GtkMessageDialog

3 years agoAdd a Refresh Key function to the key manager's context menu.
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Add a Refresh Key function to the key manager's context menu.

* src/gpaimportbykeyidop.c: New.
* src/gpaimportbykeyidop.h: New.
* src/keymanager.c (key_manager_refresh_keys): New.
(key_manager_action_new): Add ServerRefresh Action top the popup.
--

This is currently limited to one key.  It won't be complicated to
allow several keys but this has not been done because it is better
to first write code to get an array of gpgme key objects from the key
manager's selection instead of passing the selection (which has only
opaque types) to the import functions.

3 years agopo: Update Czech translation
Zdeněk Hataš [Thu, 11 Sep 2014 07:20:32 +0000 (09:20 +0200)]
po: Update Czech translation

3 years agopo: Update German translation
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
po: Update German translation

--

Still 10 strings are not translated - they are mainly for the Telesec
card - I am not inclinced to help them for free.

3 years agoImplement the IMPORT_FILES server command.
Werner Koch [Wed, 19 Nov 2014 09:34:32 +0000 (10:34 +0100)]
Implement the IMPORT_FILES server command.

* src/server.c (cmd_file): Remove --continued stuff and add --clear.
(conn_ctrl_s): Remove field files_finished.
(impl_encrypt_sign_files): Adjust for this.
(impl_decrypt_verify_files): Ditto.

* src/server.c (impl_encrypt_sign_files): Add import feature.
(cmd_import_files): Implement.
* src/gpgmetools.h (gpa_import_result_s): New.
* src/gpgmetools.c (gpa_gpgme_update_import_results): New.
(gpa_gpgme_show_import_results): New.
* src/gpaimportop.c (key_import_results_dialog_run): Remove.
(gpa_import_operation_done_cb): Use new functions.
* src/gpafileimportop.c, src/gpafileimportop.h: New.
--

The error and progress handling is not very pretty; this should be
improved similar to the verify command.

3 years agoMake receiving keys from a keyserver work with GnuPG 2.1
Werner Koch [Tue, 18 Nov 2014 19:42:15 +0000 (20:42 +0100)]
Make receiving keys from a keyserver work with GnuPG 2.1

* src/gpaimportop.h (_GpaImportOperation): Add field source2.
(_GpaImportOperationClass): Change prototype of get_source and all
callers.
* src/gpaimportop.c (gpa_import_operation_finalize): Release source2
var.
(gpa_import_operation_idle_cb): Use import_keys if source2 is set.
(key_import_results_dialog_run): Use modern info functions.
* src/gpaimportserverop.c (MAX_KEYSEARCH_RESULTS): New.
(search_keys): New.
(gpa_import_server_operation_get_source): Make use of source2.

* src/gparecvkeydlg.c (gpa_receive_key_dialog_init): Change prompt for
gnupg 2.1.0.
--

Passing the instance variable to several fucntions of the class was a
bit weird.  Thus changed to use it direct.

3 years agoAdd functions gpa_show_info and gpa_show_warning.
Werner Koch [Tue, 18 Nov 2014 19:08:19 +0000 (20:08 +0100)]
Add functions gpa_show_info and gpa_show_warning.

* src/gtktools.c (gpa_show_info): New.
(gpa_show_warning): New.
(gpa_window_message, gpa_window_error): Make them wrappers fro the new
functions.
--

Using the message dialog functions is better than doing it ourselves.
Note that a title bar is not anymore show but that is compensate by
the fact that these dialogs do not anymore show up in the taskbar.

3 years agoDo not show the keyserver setting with gnupg 2.1.0.
Werner Koch [Tue, 18 Nov 2014 16:03:27 +0000 (17:03 +0100)]
Do not show the keyserver setting with gnupg 2.1.0.

* src/settingsdlg.c (_SettingsDlg): Add field gnupg21.
(settings_dlg_init): Init new field.
(settings_dlg_constructor): Do not show the keyserver option with
gnupg 2.1.
(update_show_advanced_options): Skip the keyserver option with 2.1
(keyserver_selected_from_list_cb): Ditto.
(check_default_keyserver): Ditto.
(load_settings, save_settings): Ditto.

3 years agoAdd a File/Close option to the card manager.
Daniel Kahn Gillmor [Tue, 2 Sep 2014 01:29:36 +0000 (21:29 -0400)]
Add a File/Close option to the card manager.

* src/cardman.c (file_close): New.
(cardman_action_new): Add menu item.
--

All the other windows have a File|Close option, but the card manager
only has File|Quit.  As a result, a user who tries to close the card
manager from the menubar will most likely shut down all of GPA, which
may not be their intent.

3 years agoPost release updates.
Werner Koch [Mon, 1 Sep 2014 07:58:44 +0000 (09:58 +0200)]
Post release updates.

--

3 years agoRelease 0.9.5. gpa-0.9.5
Werner Koch [Mon, 1 Sep 2014 07:38:56 +0000 (09:38 +0200)]
Release 0.9.5.

3 years agopo: Update Czech translation
Zdeněk Hataš [Tue, 1 Jul 2014 13:36:21 +0000 (15:36 +0200)]
po: Update Czech translation

3 years agoFix warnings if build without card manager support
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
Fix warnings if build without card manager support

* src/clipboard.c (clipboard_action_new) [ENABLE_CARD_MANAGER]:
Exclude WindowsCardManager item.
* src/fileman.c (fileman_action_new): Ditto.
* src/keymanager.c (key_manager_action_new): Ditto.

3 years agoAdd option --verbose and silence some diagnostics.
Werner Koch [Wed, 25 Jun 2014 12:33:34 +0000 (14:33 +0200)]
Add option --verbose and silence some diagnostics.

* src/gpa.c (verbose): New.
(option_entries): Add option --verbose.
* src/server.c (gpa_check_server): Print some diagnostics only in
verbose mode.

3 years agoUse the gpgme spawn protocol to backup a key.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
Use the gpgme spawn protocol to backup a key.

* src/gpgmetools.c (gpa_backup_key): Rewrite.

3 years agoMake sure that a new secret key is shown without a restart.
Werner Koch [Wed, 25 Jun 2014 18:25:28 +0000 (20:25 +0200)]
Make sure that a new secret key is shown without a restart.

* src/keymanager.c (key_manager_refresh): Hack to show a new secret
key.

3 years agoLet OpenPGP specific commands only use OpenPGP keys.
Werner Koch [Wed, 14 May 2014 16:11:00 +0000 (18:11 +0200)]
Let OpenPGP specific commands only use OpenPGP keys.

* src/gpakeysignop.c (gpa_key_sign_operation_start): Skip non OpenPGP
keys.
* src/keylist.c (gpa_keylist_get_selected_keys): Add arg optional arg
PROTOCOL.  Adjust all callers.
* src/keymanager.c (key_manager_can_sign): Cehck for OpenPGP.
(key_manager_sign, key_manager_trust, key_manager_send): Act only on
OpenPGP keys.

3 years agow32: Fix directory separator in backup dialog.
Werner Koch [Wed, 14 May 2014 13:40:32 +0000 (15:40 +0200)]
w32: Fix directory separator in backup dialog.

* src/gpabackupop.c (gpa_backup_operation_dialog_run): Use correct
directory separator.

3 years agoAdd command line option --stop-server.
Werner Koch [Wed, 14 May 2014 12:52:32 +0000 (14:52 +0200)]
Add command line option --stop-server.

* src/gpa.c (main): Implement option.
* src/server.c (cmd_kill_uiserver): New.
(register_commands): Register new command.

3 years agoFix regression in edit dialogs due to new status lines.
Werner Koch [Tue, 13 May 2014 14:13:34 +0000 (16:13 +0200)]
Fix regression in edit dialogs due to new status lines.

* src/gpgmeedit.c (edit_fnc): Ignore pinentry launched status.

3 years agoImplement backup of X.509 keys.
Werner Koch [Tue, 13 May 2014 12:36:54 +0000 (14:36 +0200)]
Implement backup of X.509 keys.

* src/gpgmetools.c (gpa_backup_key): Add arg is_x509 and support X.509
backups.
* src/gpabackupop.c (PROP_PROTOCOL): New.
(gpa_backup_operation_get_property): Add it.
(gpa_backup_operation_set_property): Add it.
(gpa_backup_operation_class_init): Install new property
(gpa_backup_operation_finalize): Remove surplus NULL check.
(gpa_backup_operation_do_backup): Pass x509 flag to gpa_backup_key.
(gpa_backup_operation_dialog_run): Add arg is_x509.  Move extra label
generation out of the static dialog generation.  Use ".p12" for X.509
keys.
(gpa_backup_operation_idle_cb): Pass x509 flag to the dialog run call.
(gpa_backup_operation_new): Create protocol property from KEY.
(gpa_backup_operation_new_from_fpr): Add arg protocol.
* src/gpabackupop.h (_GpaBackupOperation): Add field protocol.
* src/gpagenkeysimpleop.c (gpa_gen_key_simple_operation_done_cb): Pass
PROTOCOL to gpa_backup_operation_new_from_fpr.
* src/keymanager.c (key_manager_mapped): Assure that
gpa_backup_oepration_new is never called with a NULL key.

3 years agoIn the subkey view show tooltips for the entire check box columns.
Werner Koch [Mon, 12 May 2014 09:59:37 +0000 (11:59 +0200)]
In the subkey view show tooltips for the entire check box columns.

* src/gpasubkeylist.c (query_tooltip_cb): New.
(gpa_subkey_list_new): Connect handler.

3 years agoDecorate expire date popup window in key generation.
Werner Koch [Mon, 12 May 2014 07:52:14 +0000 (09:52 +0200)]
Decorate expire date popup window in key generation.

* src/gpadatebutton.c (gpa_date_button_clicked): Pass parent window
to gtk_dialog_new.  Add close button to the dialog.

3 years agoUse ".asc" for armored detached OpenPGP signatures.
Werner Koch [Fri, 9 May 2014 15:23:54 +0000 (17:23 +0200)]
Use ".asc" for armored detached OpenPGP signatures.

* src/gpafilesignop.c (destination_filename): Take care of ARMOR.

3 years agoImprove detection of detached signature files.
Werner Koch [Fri, 9 May 2014 15:08:10 +0000 (17:08 +0200)]
Improve detection of detached signature files.

* src/gpafileverifyop.c (is_detached_sig): Rewrite and add test for
file.
--

GnuPG-bug-id: 1637

3 years agoShow the name of the curve and the creation date in the subkey list.
Werner Koch [Thu, 8 May 2014 18:43:46 +0000 (20:43 +0200)]
Show the name of the curve and the creation date in the subkey list.

* src/gpa-key-details.c (details_page_fill_key): Add curve info.
* src/gpasubkeylist.c (SUBKEY_CREATED): Add new column.
(gpa_subkey_list_new): Abbreviate some column titles.  Print creation
date.
(gpa_subkey_list_set_key): Set creation date and curve name.

3 years agoUse the gnupg homedir as default backup directory.
Werner Koch [Fri, 11 Apr 2014 16:26:40 +0000 (18:26 +0200)]
Use the gnupg homedir as default backup directory.

* src/gpabackupop.c (gpa_backup_operation_dialog_run): Apply
gnupg_homedir.
--

The user knows that .gnupg/ has sensitive data, thus it is better to
store backups  by default in that directory.

3 years agoAdd creation date column to allow sorting keys by age.
Werner Koch [Fri, 11 Apr 2014 16:20:35 +0000 (18:20 +0200)]
Add creation date column to allow sorting keys by age.

* src/keylist.c (GPA_KEYLIST_COLUMN_CREATED): New.
(GPA_KEYLIST_COLUMN_CREATED_TS): New.
(gpa_keylist_init): Add columns.
(setup_columns): Setup new columns.
(gpa_keylist_next): Fill new columns.

3 years agoFix segv due to wrong signal handler args.
Werner Koch [Fri, 11 Apr 2014 16:06:39 +0000 (18:06 +0200)]
Fix segv due to wrong signal handler args.

* src/gpagenkeysimpleop.c
(gpa_gen_key_simple_operation_backup_complete): Add missing arg ERR.

3 years agoMake use of a running GPA server.
Werner Koch [Fri, 11 Apr 2014 12:15:57 +0000 (14:15 +0200)]
Make use of a running GPA server.

* src/server.c (cmd_start_clipboard): New.
(cmd_start_filemanager): New.
(register_commands): Add new commands.
(cmd_getinfo): Add sub-command "name".
(check_name_cb, gpa_check_server, gpa_send_to_server): New.
* src/gpa.c (option_entries): Add option --no-remote.  Remove
options --gpg-binary and --gpgsm-binary.
(struct gpa_args_t): Add no_remote.  Remove gpg_binary and
gpgsm_binary.
(dummy_arg): New.
(main): Check for running server and start if desired.  Factor some
code out to ...
(open_requested_window): new.  Add code to connect to a running server.

3 years agow32: Inhibit console window while trying to start the agent.
Werner Koch [Thu, 10 Apr 2014 12:24:56 +0000 (14:24 +0200)]
w32: Inhibit console window while trying to start the agent.

* src/gpgmetools.c (gpa_start_agent): Use gpgme_op_spawn to start the
agent.

3 years agoUse gpgme to get the standard home directory.
Werner Koch [Wed, 9 Apr 2014 06:34:42 +0000 (08:34 +0200)]
Use gpgme to get the standard home directory.

* src/get-path.c (homedir_from_gpgconf_parser): Remove.
(homedir_from_gpgconf): Remove.
(default_homedir): Use gpgme_get_dirinfo.

3 years agow32: Add launch-gpa tool
Werner Koch [Tue, 8 Apr 2014 17:14:08 +0000 (19:14 +0200)]
w32: Add launch-gpa tool

* src/launch-gpa.c: New.
* src/Makefile.am (bin_PROGRAMS) [W32]: Add launch-gpa
(launch_gpa_LDFLAGS): New.
--

This tool is used to start gpa so that Window does not allocate a
console.

3 years agoFix double window bug with ENCRYPT_SIGN_FILES.
Werner Koch [Thu, 6 Mar 2014 14:44:44 +0000 (15:44 +0100)]
Fix double window bug with ENCRYPT_SIGN_FILES.

* src/server.c (impl_encrypt_sign_files): s/if/else if/.

4 years agoUse the generic autogen.sh script.
Werner Koch [Thu, 9 Jan 2014 18:14:09 +0000 (19:14 +0100)]
Use the generic autogen.sh script.

* autogen.rc: New.
* Makefile.am (EXTRA_DIST): Add it.
* autogen.sh: Update from GnuPG.

4 years agoMove helper scripts to build-aux/.
Werner Koch [Thu, 9 Jan 2014 18:14:09 +0000 (19:14 +0100)]
Move helper scripts to build-aux/.

* config.guess, config.rpath, config.sub, depcomp
* install-sh, mdate-sh, missing: Move to build-aux/.
* configure.ac (AC_CONFIG_AUX_DIR): New.
(AM_SILENT_RULES): New.
* Makefile.am (EXTRA_DIST): Remove config.rpath.

4 years agoAuto po file updates.
Werner Koch [Tue, 7 Jan 2014 22:08:34 +0000 (23:08 +0100)]
Auto po file updates.

--

4 years agoAdd a customized set window title function.
Werner Koch [Tue, 7 Jan 2014 21:53:51 +0000 (22:53 +0100)]
Add a customized set window title function.

* configure.ac (GPA_LONG_NAME): New.
* src/gtktools.c (gpa_window_set_title): New.  Use it instead of most
calls to gtk_window_set_title.
(make_box_title): New.
(gpa_window_error, gpa_window_message): Use it.

4 years agoAdd option --disable-keyserver-support and some cleanups.
Werner Koch [Tue, 7 Jan 2014 18:24:39 +0000 (19:24 +0100)]
Add option --disable-keyserver-support and some cleanups.

* configure.ac: Remove unused test for GPG.
(ENABLE_KEYSERVER_SUPPORT): New ac_define and am_conditional.
(GPA_NAME): New.
* src/Makefile.am (keyserver_support_sources): New.  Move keyserver
related source files to here.
* src/confdialog.c (gpa_load_configured_keyserver)
(gpa_store_configured_keyserver): Take care of ENABLE_KEYSERVER_SUPPORT.
* src/gpaexportserverop.h, src/gpaimportserverop.h: Ditto.
* src/server-access.h: Ditto.
* src/gpgmetools.h (gpa_gpgme_warning_ext, gpa_gpgme_warning): New
macros.
* src/gpgmetools.c (gpa_gpgme_warning_ext): Rename to
(_gpa_gpgme_warning): this.  Add args FILE and LINE.
(gpa_gpgme_warning): Remove.
(gpa_start_simple_gpg_command): Improve error message.
* src/keymanager.c (key_manager_retrieve) [!ENABLE_KEYSERVER_SUPPORT]:
Disable.
(key_manager_send): Ditto.
(key_manager_action_new) [!ENABLE_KEYSERVER_SUPPORT]: Disable
keyserver stuff.

4 years agoRequire gpg-error 1.12 and gpgme 1.5.0.
Werner Koch [Tue, 7 Jan 2014 18:26:40 +0000 (19:26 +0100)]
Require gpg-error 1.12 and gpgme 1.5.0.

* configure.ac (NEED_GPG_ERROR_VERSION): Set to 1.12.
(NEED_GPGME_VERSION): Set to 1.5.0.

4 years agoAdd configure option --disable-card-manager and remove switch to gpg2.
Werner Koch [Tue, 7 Jan 2014 14:16:46 +0000 (15:16 +0100)]
Add configure option --disable-card-manager and remove switch to gpg2.

* configure.ac: Add option --disable-card-manager.
* src/cardman.h [!ENABLE_CARD_MANAGER]: Do not define anything.
* src/clipboard.c (file_open): Cast off_t.
* src/gpa.c (option_entries) [!ENABLE_CARD_MANAGER]: Remove option
"--card".
(quit_if_no_window) [!ENABLE_CARD_MANAGER]: Do not check for open card
manager.
(gpa_open_cardmanager) [!ENABLE_CARD_MANAGER]: Disable.
(main): Do not call gpa_switch_to_gpg2; this is now done by gpgme.  Do
not call gpa_open_cardmanager.
* src/gpa.h (gpa_windows_menu_action_entries) [!ENABLE_CARD_MANAGER]:
Remove card manger entry.
* src/gpgmetools.c (gpa_switch_to_gpg2): Remove.
* src/keytable.c (first_half_done_cb): Change wording of notice for
missing gpgsm.
* src/server.c (cmd_start_cardmanager) [!ENABLE_CARD_MANAGER]:
Disable.
(register_commands) [!ENABLE_CARD_MANAGER]: Do not register.

4 years agoFix wrong use of GPGME_EVENT_DONE.
Werner Koch [Mon, 19 Aug 2013 18:29:25 +0000 (20:29 +0200)]
Fix wrong use of GPGME_EVENT_DONE.

* src/gpacontext.c (gpa_context_event_cb): Fix use of TYPE_DATA.  Add
debug output.
--

With GPGME commit c8e934b2 (2009-10-26) gpgme_io_event_done_data_t was
introduced to replace the use of gpg_error_t with GPGME_EVENT_DONE.
Unfortunately this was not documented.  Maybe at that time the event
code was considered internal and its use in GPA was not known.  Too
bad.

4 years agow32: Fix crash due to bad conversions of utf-8 in the clipboard.
Werner Koch [Fri, 16 Aug 2013 13:18:57 +0000 (15:18 +0200)]
w32: Fix crash due to bad conversions of utf-8 in the clipboard.

* src/gpgmetools.c (dos_to_unix): Remove.  Remove all calls.
(dump_data_to_clipboard): Return an error code instead of calling
exit.
* src/gpaexportclipop.c
(gpa_export_clipboard_operation_complete_export): Print success
message only on success.
--

The removal of dos_to_unix is possible due to the patch
https://bugzilla.gnome.org/show_bug.cgi?id=649390 which will go into
the next Gtk+ 2.24 version.dos_to_unix was anyway not correct because
it scanned for an embedded nul but it is not guaranteed that it is
always called with one.

The other patch which will be helpful is:
https://bugzilla.gnome.org/show_bug.cgi?id=696232
(g_utf8_to_utf16() is not guaranteed to succeed. Check the error and
 return if it failed.)

Gpg4win uses both patches.

GnuPG-bug-id: 1525

4 years agoImprove code readability.
Werner Koch [Fri, 16 Aug 2013 13:44:55 +0000 (15:44 +0200)]
Improve code readability.

* src/server-access.c (server_get_key): Make error checking better
readable.

4 years agoAdd noreturn attribute to gpa_gpgme_error.
Werner Koch [Fri, 16 Aug 2013 13:42:37 +0000 (15:42 +0200)]
Add noreturn attribute to gpa_gpgme_error.

* src/gpgmetools.h (_gpa_gpgme_error): Add attribute.
* src/gpa-key-details.c (gpa_key_details_find): Remove dead code.

4 years agoRemove unused function.
Werner Koch [Fri, 16 Aug 2013 13:39:20 +0000 (15:39 +0200)]
Remove unused function.

* src/server.c (hextobyte): Remove.

4 years agoDetect default homedir via gpgconf.
Werner Koch [Mon, 12 Aug 2013 16:44:06 +0000 (18:44 +0200)]
Detect default homedir via gpgconf.

* src/server.c (decode_percent_string): Move to ..
* src/utils.c (decode_percent_string): here.
* src/gpgmetools.c (gpa_start_simple_gpg_command): Add arg use_stderr
and change all callers.
(gpg_simple_stdio_cb): Implement the !use_stderr case.
* src/get-path.c: Include string.h and gpa.h.
(struct homedir_from_gpgconf_s): New.
(homedir_from_gpgconf_parser): New.
(homedir_from_gpgconf): New.
(default_homedir): First try to detect via gpgconf.
--

It would be useful to equip GPGME with a function to parse the output
of "gpgconf --list-dir".  Until then we need to go into some length to
read it.