From 2c84e835c96cb582c4466ccf42766c62d81b78d7 Mon Sep 17 00:00:00 2001 From: Edouard Tisserant Date: Wed, 2 Mar 2016 20:54:54 +0100 Subject: [PATCH] Updated rating defs, fixed trust/missTrust/resetTrust tests --- .../main/java/com/pep/k9/MainActivity.java | 21 ++----------------- src/pEp.yml2 | 15 ++++++------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/androidTests/app/src/main/java/com/pep/k9/MainActivity.java b/androidTests/app/src/main/java/com/pep/k9/MainActivity.java index 368f3f7..ed3d140 100644 --- a/androidTests/app/src/main/java/com/pep/k9/MainActivity.java +++ b/androidTests/app/src/main/java/com/pep/k9/MainActivity.java @@ -441,43 +441,26 @@ public class MainActivity extends AppCompatActivity { msg.setLongmsg("this is a test"); msg.setDir(Message.Direction.Outgoing); + Color aclr = e.outgoing_message_color(msg); if(!(aclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); e.trustPersonalKey(bob); - to = new Vector(); - to.add(bob); - msg.setTo(to); Color bclr = e.outgoing_message_color(msg); if(!(bclr.equals(Color.pEpRatingTrusted))) throw new AssertionError(); e.keyResetTrust(bob); - e.updateIdentity(bob); - to = new Vector(); - to.add(bob); - msg.setTo(to); Color cclr = e.outgoing_message_color(msg); if(!(cclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); -/* e.keyCompromized(bob); - e.updateIdentity(bob); - to = new Vector(); - to.add(bob); - msg.setTo(to); Color dclr = e.outgoing_message_color(msg); if(!(dclr.equals(Color.pEpRatingUnencrypted))) throw new AssertionError(); - FIXME : keyResetTrust do not reset - e.keyResetTrust(bob); - e.updateIdentity(bob); - to = new Vector(); - to.add(bob); - msg.setTo(to); Color oclr = e.outgoing_message_color(msg); if(!(oclr.equals(Color.pEpRatingReliable))) throw new AssertionError(); -*/ + Vector cc = new Vector(); cc.add(alice); msg.setCc(cc); diff --git a/src/pEp.yml2 b/src/pEp.yml2 index 082a890..27b2170 100644 --- a/src/pEp.yml2 +++ b/src/pEp.yml2 @@ -56,13 +56,14 @@ namespace pEp { pEp_rating_cannot_decrypt > 1 pEp_rating_have_no_key > 2 pEp_rating_unencrypted > 3 - pEp_rating_unreliable > 4 - pEp_rating_reliable > 5 - pEp_rating_yellow > 5 - pEp_rating_trusted > 6 - pEp_rating_green > 6 - pEp_rating_trusted_and_anonymized > 7 - pEp_rating_fully_anonymous > 8 + pEp_rating_unencrypted_for_some > 4 + pEp_rating_unreliable > 5 + pEp_rating_reliable > 6 + pEp_rating_yellow > 6 + pEp_rating_trusted > 7 + pEp_rating_green > 7 + pEp_rating_trusted_and_anonymized > 8 + pEp_rating_fully_anonymous > 9 pEp_rating_mistrust > -1 pEp_rating_red > -1