Lines Matching refs:ent
33 for(struct mail_crypt_key_cache_entry *ent = cache;
34 ent != NULL; ent = ent->next)
36 if (strcmp(pubid, ent->pubid) == 0) {
37 if (privkey_r != NULL && ent->pair.priv != NULL) {
38 dcrypt_key_ref_private(ent->pair.priv);
39 *privkey_r = ent->pair.priv;
41 } else if (pubkey_r != NULL && ent->pair.pub != NULL) {
42 dcrypt_key_ref_public(ent->pair.pub);
43 *pubkey_r = ent->pair.pub;
46 (ent->pair.priv == NULL &&
47 ent->pair.pub == NULL)) {
61 for(struct mail_crypt_key_cache_entry *ent = *cache;
62 ent != NULL; ent = ent->next)
64 if (strcmp(pubid, ent->pubid) == 0) {
66 if (ent->pair.priv == NULL) {
67 ent->pair.priv = privkey;
68 dcrypt_key_ref_private(ent->pair.priv);
71 if (ent->pair.pub == NULL) {
72 ent->pair.pub = pubkey;
73 dcrypt_key_ref_public(ent->pair.pub);
82 struct mail_crypt_key_cache_entry *ent =
84 ent->pubid = i_strdup(pubid);
85 ent->pair.priv = privkey;
86 ent->pair.pub = pubkey;
87 if (ent->pair.priv != NULL)
88 dcrypt_key_ref_private(ent->pair.priv);
89 if (ent->pair.pub != NULL)
90 dcrypt_key_ref_public(ent->pair.pub);
93 *cache = ent;
95 ent->next = *cache;
96 *cache = ent;