Autocrypt GPGME handler. More...
#include "config.h"
#include <gpg-error.h>
#include <gpgme.h>
#include <stdbool.h>
#include <stddef.h>
#include "private.h"
#include "mutt/lib.h"
#include "address/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "ncrypt/lib.h"
#include "question/lib.h"
#include "globals.h"
Go to the source code of this file.
Functions | |
static int | create_gpgme_context (gpgme_ctx_t *ctx) |
Create a GPGME context. | |
int | mutt_autocrypt_gpgme_init (void) |
Initialise GPGME. | |
static int | export_keydata (gpgme_ctx_t ctx, gpgme_key_t key, struct Buffer *keydata) |
Export Key data from GPGME into a Buffer. | |
int | mutt_autocrypt_gpgme_create_key (struct Address *addr, struct Buffer *keyid, struct Buffer *keydata) |
Create a GPGME key. | |
int | mutt_autocrypt_gpgme_select_key (struct Buffer *keyid, struct Buffer *keydata) |
Select a Autocrypt key. | |
int | mutt_autocrypt_gpgme_select_or_create_key (struct Address *addr, struct Buffer *keyid, struct Buffer *keydata) |
Ask the user to select or create an Autocrypt key. | |
int | mutt_autocrypt_gpgme_import_key (const char *keydata, struct Buffer *keyid) |
Read a key from GPGME. | |
bool | mutt_autocrypt_gpgme_is_valid_key (const char *keyid) |
Is a key id valid? | |
Autocrypt GPGME handler.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file gpgme.c.
|
static |
Create a GPGME context.
ctx | GPGME context to initialise |
0 | Success |
-1 | Error |
Definition at line 51 of file gpgme.c.
int mutt_autocrypt_gpgme_init | ( | void | ) |
Initialise GPGME.
0 | Always |
Definition at line 70 of file gpgme.c.
|
static |
Export Key data from GPGME into a Buffer.
ctx | GPGME context |
key | GPGME key |
keydata | Buffer for results |
0 | Success |
-1 | Error |
Definition at line 84 of file gpgme.c.
int mutt_autocrypt_gpgme_create_key | ( | struct Address * | addr, |
struct Buffer * | keyid, | ||
struct Buffer * | keydata | ||
) |
Create a GPGME key.
0 | Success |
-1 | Error |
Definition at line 158 of file gpgme.c.
Select a Autocrypt key.
[in] | keyid | Key id to select |
[out] | keydata | Buffer for resulting Key data |
0 | Success |
-1 | Error |
Definition at line 232 of file gpgme.c.
int mutt_autocrypt_gpgme_select_or_create_key | ( | struct Address * | addr, |
struct Buffer * | keyid, | ||
struct Buffer * | keydata | ||
) |
Ask the user to select or create an Autocrypt key.
0 | Success |
-1 | Error |
Definition at line 279 of file gpgme.c.
int mutt_autocrypt_gpgme_import_key | ( | const char * | keydata, |
struct Buffer * | keyid | ||
) |
Read a key from GPGME.
0 | Success |
-1 | Error |
Definition at line 320 of file gpgme.c.
bool mutt_autocrypt_gpgme_is_valid_key | ( | const char * | keyid | ) |
Is a key id valid?
keyid | Key id to check |
true | Key id is valid |
Definition at line 361 of file gpgme.c.