merged in ENGINE-600 sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Fri, 09 Aug 2019 19:19:13 +0200
branchsync
changeset 3990cf0f8bca59a4
parent 3986 37d85f89bfad
parent 3989 7797b84eecea
child 3991 7ca5149ea5b4
merged in ENGINE-600
     1.1 --- a/src/baseprotocol.c	Fri Aug 09 12:39:04 2019 +0200
     1.2 +++ b/src/baseprotocol.c	Fri Aug 09 19:19:13 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 12:39:04 2019 +0200
     2.2 +++ b/src/key_reset.c	Fri Aug 09 19:19:13 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/test/src/engine_tests/KeyResetMessageTests.cc	Fri Aug 09 12:39:04 2019 +0200
     3.2 +++ b/test/src/engine_tests/KeyResetMessageTests.cc	Fri Aug 09 19:19:13 2019 +0200
     3.3 @@ -1104,6 +1104,7 @@
     3.4      TEST_ASSERT_MSG(status == PEP_STATUS_OK, tl_status_string(status));
     3.5  
     3.6      TEST_ASSERT(alex_id->fpr);
     3.7 +    cout << "alex_id->fpr is " << alex_id->fpr << endl;
     3.8      TEST_ASSERT(strcmp(alex_id->fpr, pubkey1));
     3.9      TEST_ASSERT(strcmp(alex_id->fpr, pubkey2));
    3.10      TEST_ASSERT(strcmp(alex_id->fpr, pubkey3));