test fixes, plus updating default version for update_identity and pEp users ENGINE-559
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 26 Jun 2019 17:37:18 +0200
branchENGINE-559
changeset 38830ed6f15cf383
parent 3882 15ded0400e8b
child 3884 49d25cfc873c
test fixes, plus updating default version for update_identity and pEp users
src/keymanagement.c
test/src/engine_tests/Message2_1Tests.cc
test/src/util/test_util.cc
     1.1 --- a/src/keymanagement.c	Wed Jun 26 17:02:51 2019 +0200
     1.2 +++ b/src/keymanagement.c	Wed Jun 26 17:37:18 2019 +0200
     1.3 @@ -454,7 +454,11 @@
     1.4      
     1.5      if (pEp_user) {
     1.6          PEP_comm_type confirmation_status = identity->comm_type & PEP_ct_confirmed;
     1.7 -        identity->comm_type = PEP_ct_pEp_unconfirmed | confirmation_status;    
     1.8 +        identity->comm_type = PEP_ct_pEp_unconfirmed | confirmation_status;
     1.9 +        if (identity->major_ver == 0) {
    1.10 +            identity->major_ver = 2;
    1.11 +            identity->minor_ver = 0;
    1.12 +        }    
    1.13      }
    1.14  }
    1.15  
     2.1 --- a/test/src/engine_tests/Message2_1Tests.cc	Wed Jun 26 17:02:51 2019 +0200
     2.2 +++ b/test/src/engine_tests/Message2_1Tests.cc	Wed Jun 26 17:37:18 2019 +0200
     2.3 @@ -50,10 +50,12 @@
     2.4                                             &ptext, &psize, &keylist,
     2.5                                             NULL);
     2.6  
     2.7 +    cout << ptext << endl;
     2.8 +
     2.9      // fixme, check status
    2.10 -    if (strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL && strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL) {
    2.11 +    if (strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL && strstr(ptext, "pEp-Wrapped-Message-Info: INNER") != NULL) {
    2.12          *maj_inout = 2;
    2.13 -        *min_inout = 1;
    2.14 +        *min_inout = 0;
    2.15      }
    2.16      else if (strstr(ptext, "X-pEp-Wrapped-Message-Info: INNER") != NULL && strstr(ptext, "forwarded=no") != NULL) {
    2.17          *maj_inout = 2;
    2.18 @@ -132,7 +134,7 @@
    2.19      unsigned int major = 2;
    2.20      unsigned int minor = 0;
    2.21      TEST_ASSERT_MSG(verify_message_version_produced(enc_msg, &major, &minor),
    2.22 -                                                    (to_string(major) + to_string(minor)).c_str());
    2.23 +                                                    (to_string(major) + "." + to_string(minor)).c_str());
    2.24      
    2.25      free_identity(carol);
    2.26      free_message(msg);
     3.1 --- a/test/src/util/test_util.cc	Wed Jun 26 17:02:51 2019 +0200
     3.2 +++ b/test/src/util/test_util.cc	Wed Jun 26 17:37:18 2019 +0200
     3.3 @@ -711,7 +711,7 @@
     3.4      const char* email = NULL;
     3.5      const char* key_prefix = NULL;
     3.6      string pubkey_dir = "test_keys/pub/";
     3.7 -    string privkey_dir = "test_keys/priv";
     3.8 +    string privkey_dir = "test_keys/priv/";
     3.9      const char* fpr = NULL;
    3.10      PEP_STATUS status = PEP_STATUS_OK;
    3.11