intermediate state, implementing mistrust
authorEdouard Tisserant
Mon, 01 Feb 2016 12:11:28 +0100
changeset 442e028f6d1d583
parent 439 2f03a972d016
child 443 e91053e2875f
intermediate state, implementing mistrust
src/keymanagement.c
src/message_api.c
src/message_api.h
src/pEpEngine.h
     1.1 --- a/src/keymanagement.c	Mon Feb 01 12:06:22 2016 +0100
     1.2 +++ b/src/keymanagement.c	Mon Feb 01 12:11:28 2016 +0100
     1.3 @@ -357,7 +357,7 @@
     1.4      if (status != PEP_STATUS_OK)
     1.5          return status;
     1.6  
     1.7 -    if (ident->comm_type == PEP_ct_compromized)
     1.8 +    if (ident->comm_type == PEP_ct_mistrusted)
     1.9          ident->comm_type = PEP_ct_unknown;
    1.10      else
    1.11          ident->comm_type &= ~PEP_ct_confirmed;
     2.1 --- a/src/message_api.c	Mon Feb 01 12:06:22 2016 +0100
     2.2 +++ b/src/message_api.c	Mon Feb 01 12:11:28 2016 +0100
     2.3 @@ -566,10 +566,12 @@
     2.4          return "trusted_and_anonymized";
     2.5      case PEP_rating_fully_anonymous:
     2.6          return "fully_anonymous";
     2.7 +    case PEP_rating_mistrust:
     2.8 +        return "mistrust";
     2.9 +    case PEP_rating_b0rken:
    2.10 +        return "b0rken";
    2.11      case PEP_rating_under_attack:
    2.12          return "unter_attack";
    2.13 -    case PEP_rating_b0rken:
    2.14 -        return "b0rken";
    2.15      default:
    2.16          return "undefined";
    2.17      }
    2.18 @@ -603,6 +605,9 @@
    2.19      else if (ct == PEP_ct_compromized)
    2.20          return PEP_rating_under_attack;
    2.21  
    2.22 +    else if (ct == PEP_ct_mistrusted)
    2.23 +        return PEP_rating_mistrust;
    2.24 +    
    2.25      else if (ct >= PEP_ct_confirmed_enc_anon)
    2.26          return PEP_rating_trusted_and_anonymized;
    2.27  
     3.1 --- a/src/message_api.h	Mon Feb 01 12:06:22 2016 +0100
     3.2 +++ b/src/message_api.h	Mon Feb 01 12:11:28 2016 +0100
     3.3 @@ -57,9 +57,10 @@
     3.4      PEP_rating_trusted_and_anonymized,
     3.5      PEP_rating_fully_anonymous,   
     3.6  
     3.7 -    PEP_rating_under_attack = -1,
     3.8 -    PEP_rating_red = PEP_rating_under_attack,
     3.9 -    PEP_rating_b0rken = -2
    3.10 +    PEP_rating_mistrust = -1,
    3.11 +    PEP_rating_red = PEP_rating_mistrust,
    3.12 +    PEP_rating_b0rken = -2,
    3.13 +    PEP_rating_under_attack = -3,
    3.14  } PEP_color;
    3.15  
    3.16  // decrypt_message() - decrypt message in memory
     4.1 --- a/src/pEpEngine.h	Mon Feb 01 12:06:22 2016 +0100
     4.2 +++ b/src/pEpEngine.h	Mon Feb 01 12:11:28 2016 +0100
     4.3 @@ -293,9 +293,10 @@
     4.4  
     4.5      PEP_ct_security_by_obscurity = 0x0a,
     4.6      PEP_ct_b0rken_crypto = 0x0b,
     4.7 -    PEP_ct_key_too_short = 0x0e,
     4.8 +    PEP_ct_key_too_short = 0x0c,
     4.9  
    4.10 -    PEP_ct_compromized = 0x0f,                  // known compromized connection
    4.11 +    PEP_ct_compromized = 0x0e,                  // known compromized connection
    4.12 +    PEP_ct_mistrusted = 0x0f,                   // known mistrusted key
    4.13  
    4.14      // range 0x10 to 0x3f: unconfirmed encryption
    4.15