update_identity() now takes PEP_ct_key_expired as a special case, and replaces it with actual key rating if not expired enymore. Otherwise, partner's rating with expired key was never comming back to normal, even if key was renewed.
authorEdouard Tisserant <edouard@pep-project.org>
Fri, 28 Apr 2017 12:02:57 +0200
changeset 1738a7c4c6241b93
parent 1737 22f67e6a5df7
child 1739 73374beaca6f
update_identity() now takes PEP_ct_key_expired as a special case, and replaces it with actual key rating if not expired enymore. Otherwise, partner's rating with expired key was never comming back to normal, even if key was renewed.
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Tue Apr 25 17:21:51 2017 +0200
     1.2 +++ b/src/keymanagement.c	Fri Apr 28 12:02:57 2017 +0200
     1.3 @@ -179,10 +179,11 @@
     1.4                         downgrade eventually trusted comm_type */
     1.5                      temp_id->comm_type = _comm_type_key;
     1.6                  } else {
     1.7 -                    /* otherwise take stored comm_type as-is */
     1.8 +                    /* otherwise take stored comm_type as-is except if 
     1.9 +                       is unknown or is expired (but key not expired anymore) */
    1.10                      temp_id->comm_type = stored_identity->comm_type;
    1.11 -                    if (temp_id->comm_type == PEP_ct_unknown) {
    1.12 -                        /* except if unknown */
    1.13 +                    if (temp_id->comm_type == PEP_ct_unknown ||
    1.14 +                        temp_id->comm_type == PEP_ct_key_expired) {
    1.15                          temp_id->comm_type = _comm_type_key;
    1.16                      }
    1.17                  }