ENGINE-250: foreign keys are now on and tests pass. Be aware that with the amount of time we may have been running with them off, there may be other execution paths that cause trouble. File bugs against any DB errors. ENGINE-250
authorKrista Bennett <krista@pep-project.org>
Wed, 07 Feb 2018 16:42:56 +0100
branchENGINE-250
changeset 24837fb3205f2893
parent 2482 c713df1942dd
child 2484 93b9a267675f
child 2485 c2c187994495
ENGINE-250: foreign keys are now on and tests pass. Be aware that with the amount of time we may have been running with them off, there may be other execution paths that cause trouble. File bugs against any DB errors.
src/keymanagement.c
src/pEpEngine.c
test/least_common_denom_color_test.cc
     1.1 --- a/src/keymanagement.c	Wed Feb 07 16:16:40 2018 +0100
     1.2 +++ b/src/keymanagement.c	Wed Feb 07 16:42:56 2018 +0100
     1.3 @@ -1071,6 +1071,10 @@
     1.4          // identity set yet, this is important, as we need to record the mistrust
     1.5          // action)
     1.6          
     1.7 +        // double-check to be sure key is even in the DB
     1.8 +        if (ident->fpr)
     1.9 +            status = set_pgp_keypair(session, ident->fpr);
    1.10 +
    1.11          // We set this temporarily but will grab it back from the cache afterwards
    1.12          ident->comm_type = PEP_ct_mistrusted;
    1.13          status = set_trust(session, ident);
     2.1 --- a/src/pEpEngine.c	Wed Feb 07 16:16:40 2018 +0100
     2.2 +++ b/src/pEpEngine.c	Wed Feb 07 16:42:56 2018 +0100
     2.3 @@ -11,7 +11,7 @@
     2.4  #include <stdlib.h>
     2.5  #include <sqlite3.h>
     2.6  
     2.7 -#define _PEP_SQLITE_DEBUG 1
     2.8 +#define _PEP_SQLITE_DEBUG 0
     2.9  
    2.10  static volatile int init_count = -1;
    2.11  
     3.1 --- a/test/least_common_denom_color_test.cc	Wed Feb 07 16:16:40 2018 +0100
     3.2 +++ b/test/least_common_denom_color_test.cc	Wed Feb 07 16:42:56 2018 +0100
     3.3 @@ -40,12 +40,12 @@
     3.4      PEP_STATUS status = update_identity(session, sender);
     3.5          
     3.6      // reset the trust on both keys before we start
     3.7 -    pEp_identity * recip1 = new_identity("banmeonce@kgrothoff.org", NULL, "TOFU_banemeonce@kgrothoff.org", "Ban Me Once");    
     3.8 +    pEp_identity * recip1 = new_identity("banmeonce@kgrothoff.org", NULL, "TOFU_banmeonce@kgrothoff.org", "Ban Me Once");    
     3.9      recip1->me = false;    
    3.10      status = update_identity(session, recip1);
    3.11      key_reset_trust(session, recip1);
    3.12      
    3.13 -    pEp_identity * recip2 = new_identity("banmetwice@kgrothoff.org", NULL, "TOFU_banemetwice@kgrothoff.org", "Ban Me Twice");    
    3.14 +    pEp_identity * recip2 = new_identity("banmetwice@kgrothoff.org", NULL, "TOFU_banmetwice@kgrothoff.org", "Ban Me Twice");    
    3.15      recip2->me = false;    
    3.16      status = update_identity(session, recip2);
    3.17      key_reset_trust(session, recip2);