Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/xmpp.c @ 2187:e3b66c8ead4f
PGP: Change gpg_encrypt() so that several encryption keys can be used
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 04 Oct 2015 19:04:04 +0200 |
parents | 634cc23e8c1c |
children | 84252c616919 |
comparison
equal
deleted
inserted
replaced
2186:a852aed87ac0 | 2187:e3b66c8ead4f |
---|---|
380 * Both keys should match, in theory (cf. XEP-0027). */ | 380 * Both keys should match, in theory (cf. XEP-0027). */ |
381 const char *key; | 381 const char *key; |
382 key = settings_pgp_getkeyid(barejid); | 382 key = settings_pgp_getkeyid(barejid); |
383 if (!key && res_pgpdata) | 383 if (!key && res_pgpdata) |
384 key = res_pgpdata->sign_keyid; | 384 key = res_pgpdata->sign_keyid; |
385 if (key) | 385 if (key) { |
386 enc = gpg_encrypt(text, key); | 386 const char *keys[] = { key }; |
387 enc = gpg_encrypt(text, keys, 1); | |
388 } | |
387 if (!enc && force) { | 389 if (!enc && force) { |
388 if (encrypted) | 390 if (encrypted) |
389 *encrypted = -1; | 391 *encrypted = -1; |
390 g_free(barejid); | 392 g_free(barejid); |
391 return; | 393 return; |