2 * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2012 Colin Leroy <colin@colino.net> and
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #include "claws-features.h"
30 #include <glib/gi18n.h>
37 #include "pgpinline.h"
38 #include <plugins/pgpcore/sgpgme.h>
39 #include <plugins/pgpcore/prefs_gpg.h>
40 #include <plugins/pgpcore/passphrase.h>
41 #include "quoted-printable.h"
46 extern struct GPGConfig prefs_gpg;
48 typedef struct _PrivacyDataPGP PrivacyDataPGP;
50 struct _PrivacyDataPGP
54 gboolean done_sigtest;
56 gpgme_verify_result_t sigstatus;
60 static PrivacySystem pgpinline_system;
62 static gint pgpinline_check_signature(MimeInfo *mimeinfo);
64 static PrivacyDataPGP *pgpinline_new_privacydata()
69 data = g_new0(PrivacyDataPGP, 1);
70 data->data.system = &pgpinline_system;
71 data->done_sigtest = FALSE;
72 data->is_signed = FALSE;
73 data->sigstatus = NULL;
74 if ((err = gpgme_new(&data->ctx)) != GPG_ERR_NO_ERROR) {
75 debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
82 static void pgpinline_free_privacydata(PrivacyData *_data)
84 PrivacyDataPGP *data = (PrivacyDataPGP *) _data;
85 gpgme_release(data->ctx);
89 static gchar *fp_read_noconv(FILE *fp)
98 array = g_byte_array_new();
100 while ((n_read = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) {
101 if (n_read < sizeof(buf) && ferror(fp))
103 g_byte_array_append(array, buf, n_read);
107 FILE_OP_ERROR("file stream", "fread");
108 g_byte_array_free(array, TRUE);
113 g_byte_array_append(array, buf, 1);
114 result = (gchar *)array->data;
115 g_byte_array_free(array, FALSE);
120 static gchar *get_part_as_string(MimeInfo *mimeinfo)
122 gchar *textdata = NULL;
123 gchar *filename = NULL;
126 cm_return_val_if_fail(mimeinfo != NULL, 0);
127 procmime_decode_content(mimeinfo);
129 if (mimeinfo->content == MIMECONTENT_MEM)
130 textdata = g_strdup(mimeinfo->data.mem);
132 filename = procmime_get_tmp_file_name(mimeinfo);
133 if (procmime_get_part(filename, mimeinfo) < 0) {
134 printf("error dumping file\n");
137 fp = g_fopen(filename,"rb");
139 printf("error reading file\n");
142 textdata = fp_read_noconv(fp);
148 if (!g_utf8_validate(textdata, -1, NULL)) {
150 codeconv_set_strict(TRUE);
151 if (procmime_mimeinfo_get_parameter(mimeinfo, "charset")) {
152 tmp = conv_codeset_strdup(textdata,
153 procmime_mimeinfo_get_parameter(mimeinfo, "charset"),
157 tmp = conv_codeset_strdup(textdata,
158 conv_get_locale_charset_str_no_utf8(),
161 codeconv_set_strict(FALSE);
163 tmp = conv_codeset_strdup(textdata,
164 conv_get_locale_charset_str_no_utf8(),
176 static gboolean pgpinline_is_signed(MimeInfo *mimeinfo)
178 PrivacyDataPGP *data = NULL;
179 const gchar *sig_indicator = "-----BEGIN PGP SIGNED MESSAGE-----";
180 gchar *textdata, *sigpos;
182 cm_return_val_if_fail(mimeinfo != NULL, FALSE);
184 if (procmime_mimeinfo_parent(mimeinfo) == NULL)
185 return FALSE; /* not parent */
187 if (mimeinfo->type != MIMETYPE_TEXT &&
188 (mimeinfo->type != MIMETYPE_APPLICATION ||
189 g_ascii_strcasecmp(mimeinfo->subtype, "pgp")))
192 /* Seal the deal. This has to be text/plain through and through. */
193 if (mimeinfo->type == MIMETYPE_APPLICATION)
195 mimeinfo->type = MIMETYPE_TEXT;
196 g_free(mimeinfo->subtype);
197 mimeinfo->subtype = g_strdup("plain");
200 if (mimeinfo->privacy != NULL) {
201 data = (PrivacyDataPGP *) mimeinfo->privacy;
202 if (data->done_sigtest)
203 return data->is_signed;
206 textdata = get_part_as_string(mimeinfo);
210 if ((sigpos = strstr(textdata, sig_indicator)) == NULL) {
215 if (!(sigpos == textdata) && !(sigpos[-1] == '\n')) {
223 data = pgpinline_new_privacydata();
224 mimeinfo->privacy = (PrivacyData *) data;
226 data->done_sigtest = TRUE;
227 data->is_signed = TRUE;
232 static gint pgpinline_check_signature(MimeInfo *mimeinfo)
234 PrivacyDataPGP *data = NULL;
235 gchar *textdata = NULL, *tmp = NULL;
236 gpgme_data_t plain = NULL, cipher = NULL;
239 cm_return_val_if_fail(mimeinfo != NULL, 0);
241 if (procmime_mimeinfo_parent(mimeinfo) == NULL) {
242 privacy_set_error(_("Incorrect part"));
243 return 0; /* not parent */
245 if (mimeinfo->type != MIMETYPE_TEXT) {
246 privacy_set_error(_("Not a text part"));
247 debug_print("type %d\n", mimeinfo->type);
250 cm_return_val_if_fail(mimeinfo->privacy != NULL, 0);
251 data = (PrivacyDataPGP *) mimeinfo->privacy;
253 textdata = get_part_as_string(mimeinfo);
257 privacy_set_error(_("Couldn't get text data."));
261 /* gtk2: convert back from utf8 */
262 tmp = conv_codeset_strdup(textdata, CS_UTF_8,
263 procmime_mimeinfo_get_parameter(mimeinfo, "charset"));
265 tmp = conv_codeset_strdup(textdata, CS_UTF_8,
266 conv_get_locale_charset_str_no_utf8());
269 g_warning("Can't convert charset to anything sane\n");
270 tmp = conv_codeset_strdup(textdata, CS_UTF_8, CS_US_ASCII);
275 privacy_set_error(_("Couldn't convert text data to any sane charset."));
278 textdata = g_strdup(tmp);
281 if ((err = gpgme_new(&data->ctx)) != GPG_ERR_NO_ERROR) {
282 debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
283 privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
287 gpgme_set_textmode(data->ctx, 1);
288 gpgme_set_armor(data->ctx, 1);
290 gpgme_data_new_from_mem(&plain, textdata, (size_t)strlen(textdata), 1);
291 gpgme_data_new(&cipher);
293 data->sigstatus = sgpgme_verify_signature(data->ctx, plain, NULL, cipher);
295 gpgme_data_release(plain);
296 gpgme_data_release(cipher);
303 static SignatureStatus pgpinline_get_sig_status(MimeInfo *mimeinfo)
305 PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
307 cm_return_val_if_fail(data != NULL, SIGNATURE_INVALID);
309 if (data->sigstatus == NULL &&
310 prefs_gpg_get_config()->auto_check_signatures)
311 pgpinline_check_signature(mimeinfo);
313 return sgpgme_sigstat_gpgme_to_privacy(data->ctx, data->sigstatus);
316 static gchar *pgpinline_get_sig_info_short(MimeInfo *mimeinfo)
318 PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
320 cm_return_val_if_fail(data != NULL, g_strdup("Error"));
322 if (data->sigstatus == NULL &&
323 prefs_gpg_get_config()->auto_check_signatures)
324 pgpinline_check_signature(mimeinfo);
326 return sgpgme_sigstat_info_short(data->ctx, data->sigstatus);
329 static gchar *pgpinline_get_sig_info_full(MimeInfo *mimeinfo)
331 PrivacyDataPGP *data = (PrivacyDataPGP *) mimeinfo->privacy;
333 cm_return_val_if_fail(data != NULL, g_strdup("Error"));
335 return sgpgme_sigstat_info_full(data->ctx, data->sigstatus);
340 static gboolean pgpinline_is_encrypted(MimeInfo *mimeinfo)
342 const gchar *enc_indicator = "-----BEGIN PGP MESSAGE-----";
345 cm_return_val_if_fail(mimeinfo != NULL, FALSE);
347 if (procmime_mimeinfo_parent(mimeinfo) == NULL)
348 return FALSE; /* not parent */
350 if (mimeinfo->type != MIMETYPE_TEXT &&
351 (mimeinfo->type != MIMETYPE_APPLICATION ||
352 g_ascii_strcasecmp(mimeinfo->subtype, "pgp")))
355 /* Seal the deal. This has to be text/plain through and through. */
356 if (mimeinfo->type == MIMETYPE_APPLICATION)
358 mimeinfo->type = MIMETYPE_TEXT;
359 g_free(mimeinfo->subtype);
360 mimeinfo->subtype = g_strdup("plain");
363 textdata = get_part_as_string(mimeinfo);
367 if (!strstr(textdata, enc_indicator)) {
377 static MimeInfo *pgpinline_decrypt(MimeInfo *mimeinfo)
379 MimeInfo *decinfo, *parseinfo;
380 gpgme_data_t cipher, plain;
383 gchar *textdata = NULL;
385 const gchar *src_codeset = NULL;
386 gpgme_verify_result_t sigstat = 0;
387 PrivacyDataPGP *data = NULL;
391 const gchar *begin_indicator = "-----BEGIN PGP MESSAGE-----";
392 const gchar *end_indicator = "-----END PGP MESSAGE-----";
395 if (gpgme_new(&ctx) != GPG_ERR_NO_ERROR)
398 gpgme_set_textmode(ctx, 1);
399 gpgme_set_armor(ctx, 1);
401 cm_return_val_if_fail(mimeinfo != NULL, NULL);
402 cm_return_val_if_fail(pgpinline_is_encrypted(mimeinfo), NULL);
404 if (procmime_mimeinfo_parent(mimeinfo) == NULL ||
405 mimeinfo->type != MIMETYPE_TEXT) {
407 privacy_set_error(_("Couldn't parse mime part."));
411 textdata = get_part_as_string(mimeinfo);
414 privacy_set_error(_("Couldn't get text data."));
418 debug_print("decrypting '%s'\n", textdata);
419 gpgme_data_new_from_mem(&cipher, textdata, (size_t)strlen(textdata), 1);
421 plain = sgpgme_decrypt_verify(cipher, &sigstat, ctx);
422 if (sigstat && !sigstat->signatures)
425 gpgme_data_release(cipher);
432 fname = g_strdup_printf("%s%cplaintext.%08x",
433 get_mime_tmp_dir(), G_DIR_SEPARATOR, ++id);
435 if ((dstfp = g_fopen(fname, "wb")) == NULL) {
436 FILE_OP_ERROR(fname, "fopen");
437 privacy_set_error(_("Couldn't open decrypted file %s"), fname);
439 gpgme_data_release(plain);
444 src_codeset = procmime_mimeinfo_get_parameter(mimeinfo, "charset");
445 if (src_codeset == NULL)
446 src_codeset = CS_ISO_8859_1;
448 if (fprintf(dstfp, "MIME-Version: 1.0\r\n"
449 "Content-Type: text/plain; charset=%s\r\n"
450 "Content-Transfer-Encoding: 8bit\r\n"
453 FILE_OP_ERROR(fname, "fprintf");
454 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
458 /* Store any part before encrypted text */
459 pos = strstr(textdata, begin_indicator);
460 if (pos != NULL && (pos - textdata) > 0) {
461 if (fwrite(textdata, 1, pos - textdata, dstfp) < pos - textdata) {
462 FILE_OP_ERROR(fname, "fwrite");
463 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
468 if (fwrite(_("\n--- Start of PGP/Inline encrypted data ---\n"), 1,
469 strlen(_("\n--- Start of PGP/Inline encrypted data ---\n")),
470 dstfp) < strlen(_("\n--- Start of PGP/Inline encrypted data ---\n"))) {
471 FILE_OP_ERROR(fname, "fwrite");
472 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
475 chars = sgpgme_data_release_and_get_mem(plain, &len);
477 if (fwrite(chars, 1, len, dstfp) < len) {
478 FILE_OP_ERROR(fname, "fwrite");
480 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
485 /* Store any part after encrypted text */
486 if (fwrite(_("--- End of PGP/Inline encrypted data ---\n"), 1,
487 strlen(_("--- End of PGP/Inline encrypted data ---\n")),
488 dstfp) < strlen(_("--- End of PGP/Inline encrypted data ---\n"))) {
489 FILE_OP_ERROR(fname, "fwrite");
490 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
494 pos = strstr(pos, end_indicator);
495 if (pos != NULL && *pos != '\0') {
496 pos += strlen(end_indicator);
497 if (fwrite(pos, 1, strlen(pos), dstfp) < strlen(pos)) {
498 FILE_OP_ERROR(fname, "fwrite");
499 privacy_set_error(_("Couldn't write to decrypted file %s"), fname);
505 if (fclose(dstfp) == EOF) {
506 FILE_OP_ERROR(fname, "fclose");
507 privacy_set_error(_("Couldn't close decrypted file %s"), fname);
509 gpgme_data_release(plain);
514 parseinfo = procmime_scan_file(fname);
517 if (parseinfo == NULL) {
519 privacy_set_error(_("Couldn't scan decrypted file."));
522 decinfo = g_node_first_child(parseinfo->node) != NULL ?
523 g_node_first_child(parseinfo->node)->data : NULL;
525 if (decinfo == NULL) {
527 privacy_set_error(_("Couldn't scan decrypted file parts."));
531 g_node_unlink(decinfo->node);
532 procmime_mimeinfo_free_all(parseinfo);
536 if (sigstat != GPGME_SIG_STAT_NONE) {
537 if (decinfo->privacy != NULL) {
538 data = (PrivacyDataPGP *) decinfo->privacy;
540 data = pgpinline_new_privacydata();
541 decinfo->privacy = (PrivacyData *) data;
543 data->done_sigtest = TRUE;
544 data->is_signed = TRUE;
545 data->sigstatus = sigstat;
547 gpgme_release(data->ctx);
557 gpgme_data_release(plain);
562 static gboolean pgpinline_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from_addr)
564 MimeInfo *msgcontent;
565 gchar *textstr, *tmp;
569 gpgme_data_t gpgtext, gpgsig;
572 struct passphrase_cb_info_s info;
573 gpgme_sign_result_t result = NULL;
575 memset (&info, 0, sizeof info);
577 /* get content node from message */
578 msgcontent = (MimeInfo *) mimeinfo->node->children->data;
579 if (msgcontent->type == MIMETYPE_MULTIPART) {
580 if (!msgcontent->node->children) {
581 debug_print("msgcontent->node->children NULL, bailing\n");
582 privacy_set_error(_("Malformed message"));
585 msgcontent = (MimeInfo *) msgcontent->node->children->data;
587 /* get rid of quoted-printable or anything */
588 procmime_decode_content(msgcontent);
592 perror("my_tmpfile");
593 privacy_set_error(_("Couldn't create temporary file."));
596 procmime_write_mimeinfo(msgcontent, fp);
599 /* read temporary file into memory */
600 textstr = fp_read_noconv(fp);
604 gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
605 gpgme_data_new(&gpgsig);
606 if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
607 debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
608 privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
611 gpgme_set_textmode(ctx, 1);
612 gpgme_set_armor(ctx, 1);
614 if (!sgpgme_setup_signers(ctx, account, from_addr)) {
619 prefs_gpg_enable_agent(prefs_gpg_get_config()->use_gpg_agent);
620 if (!getenv("GPG_AGENT_INFO") || !prefs_gpg_get_config()->use_gpg_agent) {
622 gpgme_set_passphrase_cb (ctx, gpgmegtk_passphrase_cb, &info);
625 err = gpgme_op_sign(ctx, gpgtext, gpgsig, GPGME_SIG_MODE_CLEAR);
626 if (err != GPG_ERR_NO_ERROR) {
627 if (err == GPG_ERR_CANCELED) {
628 /* ignore cancelled signing */
629 privacy_reset_error();
630 debug_print("gpgme_op_sign cancelled\n");
632 privacy_set_error(_("Data signing failed, %s"), gpgme_strerror(err));
633 debug_print("gpgme_op_sign error : %x\n", err);
638 result = gpgme_op_sign_result(ctx);
639 if (result && result->signatures) {
640 gpgme_new_signature_t sig = result->signatures;
642 debug_print("valid signature: %s\n", sig->fpr);
645 } else if (result && result->invalid_signers) {
646 gpgme_invalid_key_t invalid = result->invalid_signers;
648 g_warning("invalid signer: %s (%s)", invalid->fpr,
649 gpgme_strerror(invalid->reason));
650 privacy_set_error(_("Data signing failed due to invalid signer: %s"),
651 gpgme_strerror(invalid->reason));
652 invalid = invalid->next;
657 /* can't get result (maybe no signing key?) */
658 debug_print("gpgme_op_sign_result error\n");
659 privacy_set_error(_("Data signing failed, no results."));
665 sigcontent = sgpgme_data_release_and_get_mem(gpgsig, &len);
667 if (sigcontent == NULL || len <= 0) {
668 g_warning("sgpgme_data_release_and_get_mem failed");
669 privacy_set_error(_("Data signing failed, no contents."));
670 gpgme_data_release(gpgtext);
677 tmp = g_malloc(len+1);
678 g_memmove(tmp, sigcontent, len+1);
680 gpgme_data_release(gpgtext);
684 if (msgcontent->content == MIMECONTENT_FILE &&
685 msgcontent->data.filename != NULL) {
686 if (msgcontent->tmp == TRUE)
687 claws_unlink(msgcontent->data.filename);
688 g_free(msgcontent->data.filename);
690 msgcontent->data.mem = g_strdup(tmp);
691 msgcontent->content = MIMECONTENT_MEM;
694 /* avoid all sorts of clear-signing problems with non ascii
697 procmime_encode_content(msgcontent, ENC_BASE64);
703 static gchar *pgpinline_get_encrypt_data(GSList *recp_names)
705 return sgpgme_get_encrypt_data(recp_names, GPGME_PROTOCOL_OpenPGP);
708 static const gchar *pgpinline_get_encrypt_warning(void)
710 if (prefs_gpg_should_skip_encryption_warning(pgpinline_system.id))
713 return _("Please note that attachments are not encrypted by "
714 "the PGP/Inline system, nor are email headers, like Subject.");
717 static void pgpinline_inhibit_encrypt_warning(gboolean inhibit)
720 prefs_gpg_add_skip_encryption_warning(pgpinline_system.id);
722 prefs_gpg_remove_skip_encryption_warning(pgpinline_system.id);
725 static gboolean pgpinline_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
727 MimeInfo *msgcontent;
731 gchar *textstr, *tmp;
732 gpgme_data_t gpgtext, gpgenc;
734 gpgme_key_t *kset = NULL;
735 gchar **fprs = g_strsplit(encrypt_data, " ", -1);
739 while (fprs[i] && strlen(fprs[i])) {
743 kset = g_malloc(sizeof(gpgme_key_t)*(i+1));
744 memset(kset, 0, sizeof(gpgme_key_t)*(i+1));
745 if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
746 debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
747 privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
752 while (fprs[i] && strlen(fprs[i])) {
754 err = gpgme_get_key(ctx, fprs[i], &key, 0);
756 debug_print("can't add key '%s'[%d] (%s)\n", fprs[i],i, gpgme_strerror(err));
757 privacy_set_error(_("Couldn't add GPG key %s, %s"), fprs[i], gpgme_strerror(err));
761 debug_print("found %s at %d\n", fprs[i], i);
767 debug_print("Encrypting message content\n");
769 /* get content node from message */
770 msgcontent = (MimeInfo *) mimeinfo->node->children->data;
771 if (msgcontent->type == MIMETYPE_MULTIPART) {
772 if (!msgcontent->node->children) {
773 debug_print("msgcontent->node->children NULL, bailing\n");
774 privacy_set_error(_("Malformed message"));
778 msgcontent = (MimeInfo *) msgcontent->node->children->data;
780 /* get rid of quoted-printable or anything */
781 procmime_decode_content(msgcontent);
785 privacy_set_error(_("Couldn't create temporary file, %s"), strerror(errno));
786 perror("my_tmpfile");
790 procmime_write_mimeinfo(msgcontent, fp);
793 /* read temporary file into memory */
794 textstr = fp_read_noconv(fp);
799 gpgme_data_new_from_mem(&gpgtext, textstr, (size_t)strlen(textstr), 0);
800 gpgme_data_new(&gpgenc);
801 if ((err = gpgme_new(&ctx)) != GPG_ERR_NO_ERROR) {
802 debug_print(("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
803 privacy_set_error(_("Couldn't initialize GPG context, %s"), gpgme_strerror(err));
807 gpgme_set_armor(ctx, 1);
809 err = gpgme_op_encrypt(ctx, kset, GPGME_ENCRYPT_ALWAYS_TRUST, gpgtext, gpgenc);
811 enccontent = sgpgme_data_release_and_get_mem(gpgenc, &len);
814 if (enccontent == NULL || len <= 0) {
815 g_warning("sgpgme_data_release_and_get_mem failed");
816 privacy_set_error(_("Encryption failed, %s"), gpgme_strerror(err));
817 gpgme_data_release(gpgtext);
823 tmp = g_malloc(len+1);
824 g_memmove(tmp, enccontent, len+1);
828 gpgme_data_release(gpgtext);
831 if (msgcontent->content == MIMECONTENT_FILE &&
832 msgcontent->data.filename != NULL) {
833 if (msgcontent->tmp == TRUE)
834 claws_unlink(msgcontent->data.filename);
835 g_free(msgcontent->data.filename);
837 msgcontent->data.mem = g_strdup(tmp);
838 msgcontent->content = MIMECONTENT_MEM;
845 static PrivacySystem pgpinline_system = {
846 "pgpinline", /* id */
847 "PGP Inline", /* name */
849 pgpinline_free_privacydata, /* free_privacydata */
851 pgpinline_is_signed, /* is_signed(MimeInfo *) */
852 pgpinline_check_signature, /* check_signature(MimeInfo *) */
853 pgpinline_get_sig_status, /* get_sig_status(MimeInfo *) */
854 pgpinline_get_sig_info_short, /* get_sig_info_short(MimeInfo *) */
855 pgpinline_get_sig_info_full, /* get_sig_info_full(MimeInfo *) */
857 pgpinline_is_encrypted, /* is_encrypted(MimeInfo *) */
858 pgpinline_decrypt, /* decrypt(MimeInfo *) */
864 pgpinline_get_encrypt_data,
866 pgpinline_get_encrypt_warning,
867 pgpinline_inhibit_encrypt_warning,
870 void pgpinline_init()
872 privacy_register_system(&pgpinline_system);
875 void pgpinline_done()
877 privacy_unregister_system(&pgpinline_system);
880 struct PluginFeature *plugin_provides(void)
882 static struct PluginFeature features[] =
883 { {PLUGIN_PRIVACY, N_("PGP/Inline")},
884 {PLUGIN_NOTHING, NULL}};
887 #endif /* USE_GPGME */