Fixing own_message_private_key_details, since decrypt does auto key removal now. import_own_key
authorEdouard Tisserant
Thu, 16 Jun 2016 10:02:51 +0200
branchimport_own_key
changeset 7403b1eacc35400
parent 739 7630e3ed6486
child 741 548a07ff87b9
Fixing own_message_private_key_details, since decrypt does auto key removal now.
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Jun 15 13:31:28 2016 +0200
     1.2 +++ b/src/message_api.c	Thu Jun 16 10:02:51 2016 +0200
     1.3 @@ -1518,20 +1518,15 @@
     1.4  
     1.5      *ident = NULL;
     1.6  
     1.7 +    identity_list *private_il = NULL;
     1.8 +    import_attached_keys(session, msg, &private_il);
     1.9 +
    1.10      status = decrypt_message(session, msg,  &dst, &keylist, &color, &flags);
    1.11  
    1.12      if (status == PEP_STATUS_OK &&
    1.13          flags & PEP_decrypt_flag_own_private_key)
    1.14      {
    1.15 -        identity_list *private_il = NULL;
    1.16 -        import_attached_keys(session, msg, &private_il);
    1.17 -
    1.18 -        if (private_il && 
    1.19 -            identity_list_length(private_il) == 1 &&
    1.20 -            private_il->ident->address)
    1.21 -        {
    1.22 -            *ident = identity_dup(private_il->ident);
    1.23 -        }
    1.24 +        *ident = identity_dup(private_il->ident);
    1.25          free_identity_list(private_il);
    1.26      }
    1.27