Bug 3624 - Key import isn't implemented in Windows.
Summary: Key import isn't implemented in Windows.
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (Windows)
Classification: Unclassified
Component: default (show other bugs)
Version: 3.13.2
Hardware: PC Windows 10
: P3 enhancement
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2016-03-08 12:21 UTC by Gerard Seibert
Modified: 2016-05-03 10:49 UTC (History)
0 users

See Also:


Attachments

Description Gerard Seibert 2016-03-08 12:21:10 UTC
I realize that importing a key is not supported (yet) in the Windows version of Claws-Mail. Attempting to produces this warning message:

   This key is not in your keyring.
   Key import isn't implemented in Windows.

I was just wondering if there are any plans to implement this feature? It would certainly be very useful.
Comment 1 Andrej Kacian 2016-03-09 14:17:03 UTC
Yes, there are plans, but nothing immediate - unless someone steps up and writes the code.

It should be fairly straightforward, we need to execute gpg.exe with --recv-keys argument, in a separate thread, or process. But this requires one to be familiar with Windows API for spawning new threads/processes (CreateProcess(), CreateThread() and their friends.)
Comment 2 Michael Rasmussen 2016-03-09 14:32:25 UTC
(In reply to comment #1)
> It should be fairly straightforward, we need to execute gpg.exe with
> --recv-keys argument, in a separate thread, or process. But this requires
> one to be familiar with Windows API for spawning new threads/processes
> (CreateProcess(), CreateThread() and their friends.)
Is that really necessary?
Is the spawn features from glib not enough?
https://developer.gnome.org/glib/2.26/glib-Spawning-Processes.html#g-spawn-command-line-sync
Comment 3 Andrej Kacian 2016-03-09 14:43:52 UTC
Good, we have a volunteer! :)
Comment 4 Michael Rasmussen 2016-03-09 14:53:59 UTC
(In reply to comment #3)
> Good, we have a volunteer! :)

I don't use Windows and I don't have any computer running Windows so count me out ;-)
Comment 5 Ricardo Mones 2016-03-09 16:14:06 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Good, we have a volunteer! :)
> 
> I don't use Windows and I don't have any computer running Windows so count
> me out ;-)

Isn't the point of using g_spawn to make it OS-agnostic?

Your implementation should work in Linux/BSD/whatever as well, others would test it on Windows for sure ;-)
Comment 6 Andrej Kacian 2016-05-03 09:33:33 UTC
This has now been implemented, see <http://git.claws-mail.org/?p=claws.git;a=commitdiff;h=c4a67908ff7646951679cd56b187c689f8f325ca>.

Done with bare winapi, since g_spawn* functions have a somewhat different use case than what was needed here. Also, I trust winapi more than I trust glib to not change the API in a year or so.
Comment 7 Gerard Seibert 2016-05-03 10:49:27 UTC
(In reply to comment #6)
> This has now been implemented, see
> <http://git.claws-mail.org/?p=claws.git;a=commitdiff;
> h=c4a67908ff7646951679cd56b187c689f8f325ca>.
> 
> Done with bare winapi, since g_spawn* functions have a somewhat different
> use case than what was needed here. Also, I trust winapi more than I trust
> glib to not change the API in a year or so.

Great news; thank you. Do you have any idea when a new version of claws-mail will be released? There have been at least two major changes since it was last released?

Note You need to log in before you can comment on or make changes to this bug.