Private key import is now considered as soon as private key comes from green channel. import_own_key
authorEdouard Tisserant
Wed, 15 Jun 2016 09:59:05 +0200
branchimport_own_key
changeset 737b70708554378
parent 736 496905895282
child 738 51a8af1ef550
Private key import is now considered as soon as private key comes from green channel.
src/message_api.c
     1.1 --- a/src/message_api.c	Tue Jun 14 19:23:20 2016 +0200
     1.2 +++ b/src/message_api.c	Wed Jun 15 09:59:05 2016 +0200
     1.3 @@ -1462,22 +1462,9 @@
     1.4          msg &&
     1.5          *color >= PEP_rating_green &&
     1.6          imported_private_key_address &&
     1.7 -        // [from] == to
     1.8 -        identity_list_length(msg->to) == 1 &&
     1.9 -        msg->to->ident->address && msg->from->address &&
    1.10 -        strcmp(msg->from->address, msg->to->ident->address) == 0 &&
    1.11 -        // from is own
    1.12 -        msg->from->user_id &&
    1.13 -        strcmp(msg->from->user_id, PEP_OWN_USERID) == 0 &&
    1.14          // to is [own]
    1.15          msg->to->ident->user_id &&
    1.16          strcmp(msg->to->ident->user_id, PEP_OWN_USERID) == 0 
    1.17 -        /* Disabled to allow receiving priv key from other own address */
    1.18 -        /* &&
    1.19 -        // Contains one single private key with matching address
    1.20 -        strcmp(msg->from->address, imported_private_key_address) == 0
    1.21 -        */
    1.22 -        /* TODO : test that key's address is indeed an other own address */
    1.23          )
    1.24      {
    1.25          *flags &= PEP_decrypt_flag_own_private_key;