Showing posts with label GPG Key. Show all posts
Showing posts with label GPG Key. Show all posts

6/20/08

The GPG Key selection done!

This week i have completed the GPG key selection in Evolution, using the Seahorse cryptui and its DBus APIs. And I have added a new GPG key frame to the Security tab in account editor. Of course, it is implemented through EPlugin! Following is the snapshot:

snapshot1:adding a new GPG Key frame using EPlugin, replacing the Entry with a ComboBox.
snapshot2: you can select your GPG key from the combobox now:)

Besides, if you are brave enough, you can try it now:
1.svn co svn://www.cipsc.org.cn/seahorse-key seahorse-key
2.mv seahorse-key /path/to/trunk/evolution/plugins/seahorse-key
3.patch the configure.in (using configure.in.diff in seahorse-key) and ./autogen.sh --prefix=/usr && make && make install
4.enjoy it!


Requirements:
a.Seahorse installed.(http://live.gnome.org/Seahorse)
b.Evolution trunk from svn repos( http://svn.gnome.org/svn/evolution/trunk)
c.GNU Autotools

However there are some questions:
1. How to restore the key been selected when restart the Evolution?
Apparently , this info should be stored within the account, but the EAccount structure provides no fields for this. Now i store it in a GHashTable (key is the account->address), this is very ugly.
Worse more, the hashtable will be destroyed and initialized again when the Evolution application restarts, should i write the hashtable to a file? and reload it when the Evolution restarts?
neither is a good way, IMO.

2.How to hide the original GPG Key frame through the EPlugin?
please give me some good pointers if you know that, .

Happy Hacking!

6/14/08

recent updates

hi,
i have tested the seahorse's DBus APIs and written some codes.
i want to change the key input to the key selection in Evolution. eg:
the PGP/GPG key input entry in the evolution account editor, which is needed to input manually(show in the cycle):
So, i intend to change it to a combo box, such as:and the private key list in the combo box:
The next step. i would like to read the source of evolution trunk about the key input, and integrate my combo box to the evolution.

PS: some days earlier, i met a guy from gnome_cn (Yang Hong), who works near to my school. He gave me some good advice. He said that the gpg key encryption/decryption is used more common than certificates, so he suggested me to complete the gpg key selection part first and do something to import the sender's public key automatically. eg:

Thanks Yang hong, and
Happy Hacking!