src/pEpEngine.c
changeset 15 98a6c1cc9160
parent 14 c99db0b8fc0f
child 20 63ff31d0cfbd
     1.1 --- a/src/pEpEngine.c	Tue Aug 05 20:33:20 2014 +0200
     1.2 +++ b/src/pEpEngine.c	Tue Aug 05 21:44:23 2014 +0200
     1.3 @@ -840,16 +840,18 @@
     1.4          default:
     1.5              {
     1.6                  gpgme_decrypt_result_t gpgme_decrypt_result = _session->gpgme_op_decrypt_result(_session->ctx);
     1.7 -                result = PEP_CANNOT_DECRYPT_UNKNOWN;
     1.8 +                result = PEP_DECRYPT_NO_KEY;
     1.9  
    1.10                  if (gpgme_decrypt_result != NULL) {
    1.11 -                    *keylist = new_stringlist(gpgme_decrypt_result->unsupported_algorithm);
    1.12 +                    if (gpgme_decrypt_result->unsupported_algorithm)
    1.13 +                        *keylist = new_stringlist(gpgme_decrypt_result->unsupported_algorithm);
    1.14 +                    else
    1.15 +                        *keylist = new_stringlist("");
    1.16                      assert(*keylist);
    1.17                      if (*keylist == NULL) {
    1.18                          result = PEP_OUT_OF_MEMORY;
    1.19                          break;
    1.20                      }
    1.21 -                    
    1.22                      stringlist_t *_keylist = *keylist;
    1.23                      for (gpgme_recipient_t r = gpgme_decrypt_result->recipients; r != NULL; r = r->next) {
    1.24                          _keylist = stringlist_add(_keylist, r->keyid);