src/keymanagement.c
changeset 1738 a7c4c6241b93
parent 1610 1f07d18d8bcc
child 1749 32084f52dada
child 1752 6991834e731a
child 1753 01faac16cec6
     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                  }