2 * Claws Mail -- a GTK based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2021 the Claws Mail team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
27 #define GPGERR_BUFSIZE 128
29 typedef struct _DetachedSigTaskData
31 gpgme_protocol_t protocol
;
37 EncodingType sig_encoding
;
38 gchar
*(*get_canonical_content
)(FILE *, const gchar
*);
39 } DetachedSigTaskData
;
41 void sgpgme_init(void);
42 void sgpgme_done(void);
44 void cm_free_detached_sig_task_data(gpointer data
);
46 void cm_check_detached_sig(GTask
*task
,
47 gpointer source_object
,
49 GCancellable
*cancellable
);
51 gint
cm_check_detached_sig_async(MimeInfo
*mimeinfo
,
52 GCancellable
*cancellable
,
53 GAsyncReadyCallback callback
,
55 gpgme_protocol_t protocol
,
56 gchar
*(*get_canonical_content
)(FILE *, const gchar
*));
58 gpgme_verify_result_t
sgpgme_verify_signature (gpgme_ctx_t ctx
,
62 SignatureStatus sgpgme_sigstat_gpgme_to_privacy
64 gpgme_verify_result_t status
);
65 gchar
*sgpgme_sigstat_info_short (gpgme_ctx_t ctx
,
66 gpgme_verify_result_t status
);
67 gchar
*sgpgme_sigstat_info_full (gpgme_ctx_t ctx
,
68 gpgme_verify_result_t status
);
69 gpgme_data_t
sgpgme_data_from_mimeinfo (MimeInfo
*mimeinfo
);
70 gpgme_data_t
sgpgme_decrypt_verify (gpgme_data_t cipher
,
71 gpgme_verify_result_t
*status
,
73 gchar
*sgpgme_get_encrypt_data (GSList
*recp_names
,
74 gpgme_protocol_t proto
);
75 gboolean
sgpgme_setup_signers(gpgme_ctx_t ctx
, PrefsAccount
*account
,
76 const gchar
*from_addr
);
77 void sgpgme_check_create_key(void);
78 gboolean
sgpgme_has_secret_key(void);
79 void sgpgme_create_secret_key(PrefsAccount
*account
, gboolean ask_create
);
80 void *sgpgme_data_release_and_get_mem(gpgme_data_t data
, size_t *len
);
82 gpgme_error_t
cm_gpgme_data_rewind(gpgme_data_t dh
);
83 gchar
*get_gpg_executable_name();