~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/key_mod/ecryptfs_key_mod_gpg.c

  • Committer: Dustin Kirkland
  • Date: 2009-05-02 17:40:00 UTC
  • Revision ID: kirkland@canonical.com-20090502174000-5qd420si5g8yu0ut
releasing ecryptfs-utils-75
opening -76 for development

Signed-off-by: Dustin Kirkland <kirkland@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
 
132
132
int ecryptfs_gpg_encrypt(char *to, int size, char *from, unsigned char *blob)
133
133
{
134
 
        int rc = 0;
 
134
        int rc;
135
135
 
136
136
/*      gpg_op_encrypt(...); */
137
137
out:
251
251
                         struct val_node **head, void **foo)
252
252
{
253
253
        struct key_mod_gpg *key_mod_gpg = (struct key_mod_gpg *)(*foo);
254
 
        int i = 0;
 
254
        int i;
255
255
        gpgme_error_t err;
256
256
        int rc = 0;
257
257
        gpgme_key_t key;
283
283
 
284
284
static int generate_name_val_list(struct ecryptfs_name_val_pair *head)
285
285
{
 
286
        struct stat buf;
 
287
        int i = 0;
286
288
        uid_t id = getuid();
 
289
        struct passwd *pw = getpwuid(id);
287
290
        int rc = 0;
288
291
 
289
292
        head->next = NULL;
301
304
                destroy_key_mod_gpg(key_mod_gpg);
302
305
                free(key_mod_gpg);
303
306
        }
304
 
        return 0;
305
307
}
306
308
 
307
309
 
310
312
{
311
313
        struct key_mod_gpg *key_mod_gpg;
312
314
        gpgme_error_t err;
 
315
        gpgme_keylist_result_t keylist_res;
313
316
        int rc = 0;
314
317
 
315
318
        (*foo) = NULL;
326
329
        if ((err = gpgme_op_keylist_start(key_mod_gpg->ctx, "", 0))) {
327
330
                printf("Error attempting to start keylist\n");
328
331
                rc = -EINVAL;
329
 
                gpgme_release(key_mod_gpg->ctx);
 
332
                gpgme_release(ctx);
330
333
                free(key_mod_gpg);
331
334
                goto out;
332
335
        }