Merge with ENGINE-600 sequoia_windows
authorThomas
Fri, 09 Aug 2019 14:39:33 +0200
branchsequoia_windows
changeset 39928bbc10703e00
parent 3984 af1a70dcb77c
parent 3989 7797b84eecea
child 3993 ef96c3b93658
Merge with ENGINE-600
     1.1 --- a/src/baseprotocol.c	Fri Aug 09 10:44:45 2019 +0200
     1.2 +++ b/src/baseprotocol.c	Fri Aug 09 14:39:33 2019 +0200
     1.3 @@ -29,7 +29,7 @@
     1.4          msg->attachments = bl;
     1.5      }
     1.6  
     1.7 -    if (fpr) {
     1.8 +    if (fpr && fpr[0] != '\0') {
     1.9          char *sign;
    1.10          size_t sign_size;
    1.11          status = sign_only(session,  payload, size, fpr, &sign, &sign_size);
     2.1 --- a/src/key_reset.c	Fri Aug 09 10:44:45 2019 +0200
     2.2 +++ b/src/key_reset.c	Fri Aug 09 14:39:33 2019 +0200
     2.3 @@ -520,11 +520,11 @@
     2.4                  // generate new key
     2.5                  if (status == PEP_STATUS_OK) {
     2.6                      tmp_ident->fpr = NULL;
     2.7 -                    status = generate_keypair(session, tmp_ident);
     2.8 +                    status = myself(session, tmp_ident);
     2.9                  }
    2.10 -                if (status == PEP_STATUS_OK) {
    2.11 +                if (status == PEP_STATUS_OK && tmp_ident->fpr && strcmp(fpr_copy, tmp_ident->fpr) != 0) {
    2.12                      new_key = strdup(tmp_ident->fpr);
    2.13 -                    status = set_own_key(session, tmp_ident, new_key);
    2.14 +//                    status = set_own_key(session, tmp_ident, new_key);
    2.15                  }
    2.16                  // mistrust fpr from trust
    2.17                  tmp_ident->fpr = fpr_copy;
     3.1 --- a/src/message_api.c	Fri Aug 09 10:44:45 2019 +0200
     3.2 +++ b/src/message_api.c	Fri Aug 09 14:39:33 2019 +0200
     3.3 @@ -3393,8 +3393,8 @@
     3.4      char* signer_fpr = NULL;
     3.5      bool is_pEp_msg = is_a_pEpmessage(src);
     3.6      bool myself_read_only = (src->dir == PEP_dir_incoming);
     3.7 -    unsigned int major_ver;
     3.8 -    unsigned int minor_ver;
     3.9 +    unsigned int major_ver = 0;
    3.10 +    unsigned int minor_ver = 0;
    3.11      
    3.12      // Grab input flags
    3.13      bool reencrypt = (((*flags & PEP_decrypt_flag_untrusted_server) > 0) && *keylist && !EMPTYSTR((*keylist)->value));
     4.1 --- a/test/src/engine_tests/KeyResetMessageTests.cc	Fri Aug 09 10:44:45 2019 +0200
     4.2 +++ b/test/src/engine_tests/KeyResetMessageTests.cc	Fri Aug 09 14:39:33 2019 +0200
     4.3 @@ -1104,6 +1104,7 @@
     4.4      TEST_ASSERT_MSG(status == PEP_STATUS_OK, tl_status_string(status));
     4.5  
     4.6      TEST_ASSERT(alex_id->fpr);
     4.7 +    cout << "alex_id->fpr is " << alex_id->fpr << endl;
     4.8      TEST_ASSERT(strcmp(alex_id->fpr, pubkey1));
     4.9      TEST_ASSERT(strcmp(alex_id->fpr, pubkey2));
    4.10      TEST_ASSERT(strcmp(alex_id->fpr, pubkey3));