Exemple #1
0
static int dodeletekey(int (*dump_func)(const char *, size_t, void *),
		    void *voidarg)
{
	int rc=libmail_gpg_write("Y\n", 2, dump_func, NULL, NULL, 0, voidarg);
	int rc2;

	if (rc == 0)
		rc=libmail_gpg_read(dump_func, NULL, NULL, 0, voidarg);
	rc2=libmail_gpg_cleanup();
	if (rc == 0)
		rc=rc2;
	return (rc);
}
Exemple #2
0
static int dosignkey(int (*dump_func)(const char *, size_t, void *),
                     const char *cmdstr,
                     void *voidarg)
{
    int rc=libmail_gpg_write( cmdstr, strlen(cmdstr),
                              dump_func, NULL, NULL, 0, voidarg);
    int rc2;

    if (rc == 0)
        rc=libmail_gpg_read(dump_func, NULL, NULL, 0, voidarg);
    rc2=libmail_gpg_cleanup();
    if (rc == 0)
        rc=rc2;
    return (rc);
}