attach key to unencrypted mail
authorVolker Birk <vb@pep-project.org>
Mon, 15 Jun 2015 13:29:39 +0200
changeset 319dc8892e88eff
parent 318 9e32ec25bf12
child 320 2f4098bd3289
attach key to unencrypted mail
src/message_api.c
     1.1 --- a/src/message_api.c	Sat Jun 13 02:37:10 2015 +0200
     1.2 +++ b/src/message_api.c	Mon Jun 15 13:29:39 2015 +0200
     1.3 @@ -941,9 +941,15 @@
     1.4  
     1.5          case PEP_enc_pieces:
     1.6              status = encrypt_PGP_in_pieces(session, src, keys, msg);
     1.7 -            if (status != PEP_STATUS_OK)
     1.8 +            if (status == PEP_OUT_OF_MEMORY)
     1.9 +                goto enomem;
    1.10 +            if (status != PEP_STATUS_OK) {
    1.11 +                attach_own_key(session, src);
    1.12                  goto pep_error;
    1.13 -            attach_own_key(session, msg);
    1.14 +            }
    1.15 +            else {
    1.16 +                attach_own_key(session, msg);
    1.17 +            }
    1.18              break;
    1.19  
    1.20          case PEP_enc_PEP: