-i is now optional for encryption if recipient specified, -R exchanged with -r, added virtual env for manual tests in tests/env/

This commit is contained in:
TLINDEN
2013-11-03 14:39:16 +01:00
parent bf5556e1ec
commit 79068fce66
29 changed files with 944 additions and 1515 deletions

View File

@@ -547,3 +547,20 @@ void pcpedit_key(char *keyid) {
}
char *pcp_find_id_byrec(char *recipient) {
pcp_pubkey_t *p;
char *id = NULL;
for(p=pcppubkey_hash; p != NULL; p=(pcp_pubkey_t*)(p->hh.next)) {
if(strncmp(p->owner, recipient, 255) == 0) {
id = ucmalloc(17);
strncpy(id, p->id, 17);
break;
}
if(strncmp(p->mail, recipient, 255) == 0) {
id = ucmalloc(17);
strncpy(id, p->id, 17);
break;
}
}
return id;
}