diff options
Diffstat (limited to 'g10/mainproc.c')
| -rw-r--r-- | g10/mainproc.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/g10/mainproc.c b/g10/mainproc.c index fc7bee32b..e2703516c 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -96,7 +96,7 @@ struct mainproc_context iobuf_t iobuf; /* Used to get the filename etc. */ int trustletter; /* Temporary usage in list_node. */ ulong symkeys; /* Number of symmetrically encrypted session keys. */ - struct pubkey_enc_list *pkenc_list; /* List of encryption packets. */ + struct seskey_enc_list *sesenc_list; /* List of encryption packets. */ struct symlist_item *symenc_list; /* List of sym. encryption packets. */ int seen_pkt_encrypted_aead; /* PKT_ENCRYPTED_AEAD packet seen. */ int seen_pkt_encrypted_mdc; /* PKT_ENCRYPTED_MDC packet seen. */ @@ -137,8 +137,8 @@ release_list( CTX c ) { proc_tree (c, c->list); release_kbnode (c->list); - free_pubkey_enc_list (c->pkenc_list); - c->pkenc_list = NULL; + free_seskey_enc_list (c->sesenc_list); + c->sesenc_list = NULL; while (c->symenc_list) { struct symlist_item *tmp = c->symenc_list->next; @@ -517,12 +517,12 @@ proc_pubkey_enc (CTX c, PACKET *pkt) if (!opt.list_only && !opt.override_session_key) { - struct pubkey_enc_list *x = xcalloc (1, sizeof *x); + struct seskey_enc_list *x = xcalloc (1, sizeof *x); copy_pubkey_enc_parts (&x->u.pub, enc); x->result = -1; - x->next = c->pkenc_list; - c->pkenc_list = x; + x->next = c->sesenc_list; + c->sesenc_list = x; } free_packet(pkt, NULL); @@ -534,7 +534,7 @@ proc_pubkey_enc (CTX c, PACKET *pkt) * not decrypt. */ static void -print_pkenc_list (ctrl_t ctrl, struct pubkey_enc_list *list) +print_sesenc_list (ctrl_t ctrl, struct seskey_enc_list *list) { for (; list; list = list->next) { @@ -589,7 +589,7 @@ proc_encrypted (CTX c, PACKET *pkt) if (pkt->pkttype == PKT_ENCRYPTED_MDC) c->seen_pkt_encrypted_mdc = 1; } - else /* No PKT indicates the the add-recipients mode. */ + else /* No PKT indicates the add-recipients mode. */ log_assert (c->ctrl->modify_recipients); if (early_plaintext) @@ -605,7 +605,7 @@ proc_encrypted (CTX c, PACKET *pkt) log_info (_("encrypted with %lu passphrases\n"), c->symkeys); else if (c->symkeys == 1) log_info (_("encrypted with 1 passphrase\n")); - print_pkenc_list (c->ctrl, c->pkenc_list); + print_sesenc_list (c->ctrl, c->sesenc_list); } /* Figure out the session key by looking at all pkenc packets. */ @@ -624,15 +624,15 @@ proc_encrypted (CTX c, PACKET *pkt) write_status_error ("pkdecrypt_failed", result); } } - else if (c->pkenc_list) + else if (c->sesenc_list) { c->dek = xmalloc_secure_clear (sizeof *c->dek); - result = get_session_key (c->ctrl, c->pkenc_list, c->dek); + result = get_session_key (c->ctrl, c->sesenc_list, c->dek); if (is_status_enabled ()) { - struct pubkey_enc_list *list; + struct seskey_enc_list *list; - for (list = c->pkenc_list; list; list = list->next) + for (list = c->sesenc_list; list; list = list->next) if (list->result && !list->u_sym) { /* Key was not tried or it caused an error. */ char buf[20]; @@ -738,7 +738,7 @@ proc_encrypted (CTX c, PACKET *pkt) } else if (!c->dek) { - if (c->symkeys && !c->pkenc_list) + if (c->symkeys && !c->sesenc_list) result = gpg_error (GPG_ERR_BAD_KEY); if (!result) @@ -766,12 +766,12 @@ proc_encrypted (CTX c, PACKET *pkt) && !unknown_ciphermode && gnupg_cipher_is_compliant (CO_DE_VS, c->dek->algo, ciphermode)) { - struct pubkey_enc_list *i; + struct seskey_enc_list *i; struct symlist_item *si; int compliant = 1; PKT_public_key *pk = xmalloc (sizeof *pk); - if ( !(c->pkenc_list || c->symkeys) ) + if ( !(c->sesenc_list || c->symkeys) ) log_debug ("%s: where else did the session key come from?\n", __func__); /* Check that all seen symmetric key packets use compliant @@ -787,7 +787,7 @@ proc_encrypted (CTX c, PACKET *pkt) /* Check that every known public key used to encrypt the session key * is compliant. */ - for (i = c->pkenc_list; i && compliant; i = i->next) + for (i = c->sesenc_list; i && compliant; i = i->next) { if (i->u_sym) continue; @@ -1639,7 +1639,7 @@ proc_signature_packets_by_fd (ctrl_t ctrl, void *anchor, iobuf_t a, * needs to release them; even if the function returns an error. */ gpg_error_t proc_encryption_packets (ctrl_t ctrl, void *anchor, iobuf_t a, - DEK **r_dek, struct pubkey_enc_list **r_list) + DEK **r_dek, struct seskey_enc_list **r_list) { CTX c = xmalloc_clear (sizeof *c); int rc; @@ -1652,8 +1652,8 @@ proc_encryption_packets (ctrl_t ctrl, void *anchor, iobuf_t a, rc = do_proc_packets (c, a, 1); *r_dek = c->dek; c->dek = NULL; - *r_list = c->pkenc_list; - c->pkenc_list = NULL; + *r_list = c->sesenc_list; + c->sesenc_list = NULL; } else rc = do_proc_packets (c, a, 0); @@ -1682,7 +1682,7 @@ check_nesting (CTX c) /* Main processing loop. If KEEP_DEK_AND_LIST is set the DEK and - * PKENC_LIST of the context C are not released at the end of the + * SESENC_LIST of the context C are not released at the end of the * function. The caller is then required to do this. */ static int do_proc_packets (CTX c, iobuf_t a, int keep_dek_and_list) |
