key_reset_own_and_deliver_revocations merge sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 10 Dec 2019 17:57:39 +0100
branchsync
changeset 424866bea48a09d5
parent 4244 8d4faa88ddcf
parent 4247 6bb362f1734e
child 4250 89cd46a2a7e2
key_reset_own_and_deliver_revocations merge
     1.1 --- a/src/key_reset.c	Mon Dec 09 16:36:46 2019 +0100
     1.2 +++ b/src/key_reset.c	Tue Dec 10 17:57:39 2019 +0100
     1.3 @@ -156,7 +156,7 @@
     1.4      new_fpr = strdup(p + 5);
     1.5          
     1.6      // Reset the original key
     1.7 -    status = key_reset(session, old_fpr, temp_ident);
     1.8 +    status = key_reset(session, old_fpr, temp_ident, NULL, NULL);
     1.9      if (status != PEP_STATUS_OK)
    1.10          goto pEp_free;
    1.11          
    1.12 @@ -334,7 +334,7 @@
    1.13      if (!session || !ident || (ident && (EMPTYSTR(ident->user_id) || EMPTYSTR(ident->address))))
    1.14          return PEP_ILLEGAL_VALUE;
    1.15      
    1.16 -    return key_reset(session, fpr, ident);    
    1.17 +    return key_reset(session, fpr, ident, NULL, NULL);    
    1.18  }
    1.19  
    1.20  DYNAMIC_API PEP_STATUS key_reset_user(
    1.21 @@ -353,13 +353,13 @@
    1.22      if (is_me(session, input_ident) && EMPTYSTR(fpr))
    1.23          return PEP_ILLEGAL_VALUE;
    1.24          
    1.25 -    PEP_STATUS status = key_reset(session, fpr, input_ident);
    1.26 +    PEP_STATUS status = key_reset(session, fpr, input_ident, NULL, NULL);
    1.27      free_identity(input_ident);
    1.28      return status;
    1.29  }
    1.30  
    1.31  DYNAMIC_API PEP_STATUS key_reset_all_own_keys(PEP_SESSION session) {
    1.32 -    return key_reset(session, NULL, NULL);
    1.33 +    return key_reset(session, NULL, NULL, NULL, NULL);
    1.34  }
    1.35  
    1.36  // Notes to integrate into header:
    1.37 @@ -367,7 +367,9 @@
    1.38  PEP_STATUS key_reset(
    1.39          PEP_SESSION session,
    1.40          const char* key_id,
    1.41 -        pEp_identity* ident
    1.42 +        pEp_identity* ident,
    1.43 +        identity_list** own_identities,
    1.44 +        stringlist_t** own_revoked_fprs
    1.45      )
    1.46  {
    1.47      if (!session || (ident && EMPTYSTR(ident->user_id)))
    1.48 @@ -417,7 +419,7 @@
    1.49              
    1.50              for (curr_key = keys; curr_key && curr_key->value; curr_key = curr_key->next) {
    1.51                  // FIXME: Is the ident really necessary?
    1.52 -                status = key_reset(session, curr_key->value, tmp_ident);
    1.53 +                status = key_reset(session, curr_key->value, tmp_ident, own_identities, own_revoked_fprs);
    1.54                  if (status != PEP_STATUS_OK)
    1.55                      break;
    1.56              }
    1.57 @@ -497,7 +499,7 @@
    1.58                              
    1.59                              pEp_identity* this_identity = curr_ident->ident;
    1.60                              // Do the full reset on this identity        
    1.61 -                            status = key_reset(session, fpr_copy, this_identity);
    1.62 +                            status = key_reset(session, fpr_copy, this_identity, own_identities, own_revoked_fprs);
    1.63                              
    1.64                              // Ident list gets freed below, do not free here!
    1.65  
    1.66 @@ -512,7 +514,8 @@
    1.67                  }    
    1.68              }
    1.69              
    1.70 -            // Create revocation
    1.71 +            // Base case for is_own_private starts here
    1.72 +            
    1.73              status = revoke_key(session, fpr_copy, NULL);
    1.74              
    1.75              // If we have a full identity, we have some cleanup and generation tasks here
    1.76 @@ -526,9 +529,23 @@
    1.77                      new_key = strdup(tmp_ident->fpr);
    1.78  //                    status = set_own_key(session, tmp_ident, new_key);
    1.79                  }
    1.80 +
    1.81 +                if (own_revoked_fprs) {
    1.82 +                    // We can dedup this later
    1.83 +                    if (!(*own_revoked_fprs))
    1.84 +                        *own_revoked_fprs = new_stringlist(NULL);
    1.85 +                    
    1.86 +                    char* revkey = strdup(fpr_copy);
    1.87 +                    if (!revkey) {
    1.88 +                        status = PEP_OUT_OF_MEMORY;
    1.89 +                        goto pEp_free;
    1.90 +                    }
    1.91 +                    stringlist_add(*own_revoked_fprs, revkey);                
    1.92 +                }
    1.93 +                
    1.94                  // mistrust fpr from trust
    1.95                  tmp_ident->fpr = fpr_copy;
    1.96 -                
    1.97 +                                                
    1.98                  tmp_ident->comm_type = PEP_ct_mistrusted;
    1.99                  status = set_trust(session, tmp_ident);
   1.100                  tmp_ident->fpr = NULL;
   1.101 @@ -538,6 +555,18 @@
   1.102                      // Update fpr for outgoing
   1.103                      status = myself(session, tmp_ident);
   1.104                  }
   1.105 +                
   1.106 +                if (status == PEP_STATUS_OK && own_identities) {
   1.107 +                    if (!(*own_identities))
   1.108 +                        *own_identities = new_identity_list(NULL);
   1.109 +                    
   1.110 +                    pEp_identity* new_ident = identity_dup(tmp_ident);
   1.111 +                    if (!new_ident) {
   1.112 +                        status = PEP_OUT_OF_MEMORY;
   1.113 +                        goto pEp_free;
   1.114 +                    }
   1.115 +                    identity_list_add(*own_identities, new_ident);            
   1.116 +                }    
   1.117              }    
   1.118              
   1.119              if (status == PEP_STATUS_OK)
   1.120 @@ -577,6 +606,7 @@
   1.121              // we want it gone anyway)
   1.122              //
   1.123              // Delete this key from the keyring.
   1.124 +            // FIXME: when key election disappears, so should this!
   1.125              status = delete_keypair(session, fpr_copy);
   1.126          }
   1.127  
   1.128 @@ -604,3 +634,75 @@
   1.129      free(new_key);    
   1.130      return status;
   1.131  }
   1.132 +
   1.133 +static stringlist_t* collect_key_material(PEP_SESSION session, stringlist_t* fprs) {
   1.134 +    stringlist_t* keydata = NULL;    
   1.135 +    stringlist_t* curr_fpr = fprs;    
   1.136 +    while (curr_fpr) {
   1.137 +        if (curr_fpr->value) {
   1.138 +            char* key_material = NULL;
   1.139 +            size_t datasize = 0;
   1.140 +            PEP_STATUS status = export_key(session, curr_fpr->value, &key_material, &datasize);
   1.141 +            if (status) {
   1.142 +                free_stringlist(keydata);
   1.143 +                return NULL;
   1.144 +            }
   1.145 +            if (datasize > 0 && key_material) {
   1.146 +                if (!(keydata))
   1.147 +                    keydata = new_stringlist(NULL);
   1.148 +                    
   1.149 +                stringlist_add(keydata, key_material);
   1.150 +            }
   1.151 +        }
   1.152 +        curr_fpr = curr_fpr->next;        
   1.153 +    }   
   1.154 +    return keydata; 
   1.155 +}
   1.156 +
   1.157 +PEP_STATUS key_reset_own_and_deliver_revocations(PEP_SESSION session, 
   1.158 +                                                 identity_list** own_identities, 
   1.159 +                                                 stringlist_t** revocations, 
   1.160 +                                                 stringlist_t** keys) {
   1.161 +
   1.162 +    if (!(session && own_identities && revocations && keys))
   1.163 +        return PEP_ILLEGAL_VALUE;
   1.164 +        
   1.165 +    stringlist_t* revoked_fprs = NULL;
   1.166 +    identity_list* affected_idents = NULL;
   1.167 +        
   1.168 +    PEP_STATUS status = key_reset(session, NULL, NULL, &affected_idents, &revoked_fprs);                                                 
   1.169 +
   1.170 +    // FIXME: free things
   1.171 +    if (status != PEP_STATUS_OK)
   1.172 +        return status;
   1.173 +    
   1.174 +    dedup_stringlist(revoked_fprs);
   1.175 +
   1.176 +    *revocations = collect_key_material(session, revoked_fprs);
   1.177 +    stringlist_t* keydata = NULL;
   1.178 +    
   1.179 +    if (affected_idents) {
   1.180 +        keydata = new_stringlist(NULL);
   1.181 +        identity_list* curr_ident = affected_idents;
   1.182 +        while (curr_ident) {
   1.183 +            if (curr_ident->ident && curr_ident->ident->fpr) {
   1.184 +                char* key_material = NULL;
   1.185 +                size_t datasize = 0;
   1.186 +                status = export_key(session, curr_ident->ident->fpr, &key_material, &datasize);
   1.187 +                if (status) {
   1.188 +                    free_stringlist(keydata);
   1.189 +                    return status;
   1.190 +                }
   1.191 +                if (datasize > 0 && key_material)
   1.192 +                    stringlist_add(keydata, key_material);
   1.193 +            }
   1.194 +            curr_ident = curr_ident->next;
   1.195 +        }
   1.196 +    }
   1.197 +    
   1.198 +    *own_identities = affected_idents;
   1.199 +    *keys = keydata;
   1.200 +    
   1.201 +    free(revoked_fprs);
   1.202 +    return PEP_STATUS_OK;
   1.203 +}
     2.1 --- a/src/key_reset.h	Mon Dec 09 16:36:46 2019 +0100
     2.2 +++ b/src/key_reset.h	Tue Dec 10 17:57:39 2019 +0100
     2.3 @@ -122,10 +122,17 @@
     2.4  PEP_STATUS key_reset(
     2.5          PEP_SESSION session,
     2.6          const char* fpr,
     2.7 -        pEp_identity* ident
     2.8 +        pEp_identity* ident,
     2.9 +        identity_list** own_identities,
    2.10 +        stringlist_t** own_revoked_fprs
    2.11      );
    2.12  
    2.13  
    2.14 +PEP_STATUS key_reset_own_and_deliver_revocations(PEP_SESSION session, 
    2.15 +                                                 identity_list** own_identities, 
    2.16 +                                                 stringlist_t** revocations, 
    2.17 +                                                 stringlist_t** keys);
    2.18 +
    2.19  
    2.20  PEP_STATUS has_key_reset_been_sent(
    2.21          PEP_SESSION session, 
     3.1 --- a/src/pEp_internal.h	Mon Dec 09 16:36:46 2019 +0100
     3.2 +++ b/src/pEp_internal.h	Tue Dec 10 17:57:39 2019 +0100
     3.3 @@ -228,6 +228,7 @@
     3.4      sqlite3_stmt *is_own_address;
     3.5      sqlite3_stmt *own_identities_retrieve;
     3.6      sqlite3_stmt *own_keys_retrieve;
     3.7 +    sqlite3_stmt *key_identities_retrieve;
     3.8      sqlite3_stmt *get_user_default_key;
     3.9      sqlite3_stmt *get_all_keys_for_user;
    3.10          
    3.11 @@ -570,4 +571,3 @@
    3.12      } while (rc == SQLITE_BUSY || rc == SQLITE_LOCKED);
    3.13      return rc;
    3.14  }
    3.15 -
     4.1 --- a/src/pgp_gpg.c	Mon Dec 09 16:36:46 2019 +0100
     4.2 +++ b/src/pgp_gpg.c	Tue Dec 10 17:57:39 2019 +0100
     4.3 @@ -678,6 +678,8 @@
     4.4                              break;
     4.5                          }
     4.6                          case GPG_ERR_CERT_REVOKED:
     4.7 +                            result = PEP_VERIFY_SIGNER_KEY_REVOKED;
     4.8 +                            break;
     4.9                          case GPG_ERR_BAD_SIGNATURE:
    4.10                              result = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
    4.11                              //result = PEP_DECRYPT_BAD_SIGNATURE;
    4.12 @@ -3129,4 +3131,3 @@
    4.13              return PEP_CANNOT_CONFIG;
    4.14      }
    4.15  }
    4.16 -
     5.1 --- a/src/pgp_sequoia.c	Mon Dec 09 16:36:46 2019 +0100
     5.2 +++ b/src/pgp_sequoia.c	Tue Dec 10 17:57:39 2019 +0100
     5.3 @@ -2842,6 +2842,14 @@
     5.4  
     5.5      *comm_type = PEP_ct_OpenPGP_unconfirmed;
     5.6  
     5.7 +    pgp_revocation_status_t rs = pgp_cert_revoked(cert, 0);
     5.8 +    pgp_revocation_status_variant_t rsv = pgp_revocation_status_variant(rs);
     5.9 +    pgp_revocation_status_free(rs);
    5.10 +    if (rsv == PGP_REVOCATION_STATUS_REVOKED) {
    5.11 +        *comm_type = PEP_ct_key_revoked;
    5.12 +        goto out;
    5.13 +    }
    5.14 +
    5.15      bool expired = false;
    5.16      
    5.17      // MUST guarantee the same behaviour.
    5.18 @@ -2857,13 +2865,6 @@
    5.19      //     goto out;
    5.20      // }
    5.21  
    5.22 -    pgp_revocation_status_t rs = pgp_cert_revoked(cert, 0);
    5.23 -    pgp_revocation_status_variant_t rsv = pgp_revocation_status_variant(rs);
    5.24 -    pgp_revocation_status_free(rs);
    5.25 -    if (rsv == PGP_REVOCATION_STATUS_REVOKED) {
    5.26 -        *comm_type = PEP_ct_key_revoked;
    5.27 -        goto out;
    5.28 -    }
    5.29  
    5.30      PEP_comm_type best_enc = PEP_ct_no_encryption, best_sign = PEP_ct_no_encryption;
    5.31      pgp_cert_key_iter_t key_iter = pgp_cert_key_iter_valid(cert);
     6.1 --- a/test/src/KeyResetMessageTest.cc	Mon Dec 09 16:36:46 2019 +0100
     6.2 +++ b/test/src/KeyResetMessageTest.cc	Tue Dec 10 17:57:39 2019 +0100
     6.3 @@ -307,7 +307,7 @@
     6.4      );
     6.5      ASSERT_EQ(int_result , SQLITE_OK);
     6.6  
     6.7 -    status = key_reset(session, alice_fpr, from_ident);
     6.8 +    status = key_reset(session, alice_fpr, from_ident, NULL, NULL);
     6.9      ASSERT_EQ(status , PEP_STATUS_OK);
    6.10      ASSERT_GT(m_queue.size(), 0);
    6.11      status = myself(session, from_ident);
    6.12 @@ -460,7 +460,7 @@
    6.13      ASSERT_STRCASEEQ(from_ident->fpr, alice_fpr);
    6.14      ASSERT_TRUE(from_ident->me);
    6.15  
    6.16 -    status = key_reset(session, alice_fpr, from_ident);
    6.17 +    status = key_reset(session, alice_fpr, from_ident, NULL, NULL);
    6.18      ASSERT_EQ(status , PEP_STATUS_OK);
    6.19      m_queue.clear();
    6.20  
    6.21 @@ -524,7 +524,7 @@
    6.22      // FIXME: longer term we need to fix the test, but the key attached to the message below has expired, so for now, we give her a new key
    6.23      slurp_and_import_key(session, "test_keys/pub/pep-test-gabrielle-0xE203586C_pub.asc");
    6.24  
    6.25 -    status = key_reset(session, alice_fpr, from_ident);
    6.26 +    status = key_reset(session, alice_fpr, from_ident, NULL, NULL);
    6.27      ASSERT_EQ(status , PEP_STATUS_OK);
    6.28      ASSERT_EQ(m_queue.size() , 0);
    6.29      m_queue.clear();
    6.30 @@ -570,10 +570,10 @@
    6.31      ASSERT_STRCASEEQ(from_ident->fpr, alice_fpr);
    6.32      ASSERT_TRUE(from_ident->me);
    6.33  
    6.34 -    status = key_reset(session, NULL, NULL);
    6.35 +    status = key_reset(session, NULL, NULL, NULL, NULL);
    6.36      ASSERT_EQ(status , PEP_STATUS_OK);
    6.37  
    6.38 -    status = key_reset(session, NULL, NULL);
    6.39 +    status = key_reset(session, NULL, NULL, NULL, NULL);
    6.40      ASSERT_EQ(status , PEP_STATUS_OK);
    6.41  
    6.42      status = myself(session, from_ident);
    6.43 @@ -1308,3 +1308,132 @@
    6.44      ASSERT_EQ(rating, PEP_rating_reliable);
    6.45      
    6.46  }
    6.47 +
    6.48 +TEST_F(KeyResetMessageTest, check_reset_own_with_revocations) {
    6.49 +    pEp_identity* id1 = new_identity("krista-not-real@darthmama.org", NULL, PEP_OWN_USERID, "Krista at Home");    
    6.50 +    PEP_STATUS status = myself(session, id1);
    6.51 +    pEp_identity* id2 = NULL;
    6.52 +    status = set_up_preset(session, ALICE, true, true, false, false, false, &id2);
    6.53 +    pEp_identity* id3 = new_identity("krista-not-real@angryshark.eu", NULL, PEP_OWN_USERID, "Krista at Shark");
    6.54 +    status = myself(session, id3);
    6.55 +    pEp_identity* id4 = NULL;    
    6.56 +    status = set_up_preset(session, BOB, true, false, false, false, false, &id4);
    6.57 +    pEp_identity* id5 = new_identity("krista-not-real@pep.foundation", NULL, PEP_OWN_USERID, "Krista at Work");
    6.58 +    status = myself(session, id5);
    6.59 +    pEp_identity* id6 = new_identity("grrrr-not-real@angryshark.eu", NULL, PEP_OWN_USERID, "GRRRR is a Shark");
    6.60 +    status = myself(session, id6);
    6.61 +    pEp_identity* id7 = NULL;
    6.62 +    status = set_up_preset(session, CAROL, true, false, true, false, false, &id7);
    6.63 +    pEp_identity* id8 = NULL;    
    6.64 +    status = set_up_preset(session, DAVE, true, true, true, false, false, &id8);
    6.65 +
    6.66 +    identity_list* own_identities = NULL;
    6.67 +    stringlist_t* revocations = NULL;
    6.68 +    stringlist_t* keys = NULL;
    6.69 +    
    6.70 +    stringlist_t* first_keylist = new_stringlist(NULL);
    6.71 +    stringlist_add(first_keylist, strdup(id1->fpr));
    6.72 +    stringlist_add(first_keylist, strdup(id3->fpr));
    6.73 +    stringlist_add(first_keylist, strdup(id5->fpr));
    6.74 +    stringlist_add(first_keylist, strdup(id6->fpr));
    6.75 +    
    6.76 +    status = key_reset_own_and_deliver_revocations(session, 
    6.77 +                                                   &own_identities, 
    6.78 +                                                   &revocations, 
    6.79 +                                                   &keys);
    6.80 +                                                                                                      
    6.81 +    ASSERT_EQ(status, PEP_STATUS_OK);
    6.82 +    ASSERT_NE(own_identities, nullptr);
    6.83 +    ASSERT_NE(revocations, nullptr);
    6.84 +    ASSERT_NE(keys, nullptr);
    6.85 +
    6.86 +    int i = 0;
    6.87 +    identity_list* curr_ident = own_identities;
    6.88 +    stringlist_t* second_keylist = new_stringlist(NULL);
    6.89 +    
    6.90 +    for (i = 0; i < 4 && curr_ident; i++, curr_ident = curr_ident->next) {
    6.91 +        ASSERT_NE(curr_ident->ident, nullptr);
    6.92 +        ASSERT_NE(curr_ident->ident->fpr, nullptr);        
    6.93 +        stringlist_t* found = stringlist_search(first_keylist, curr_ident->ident->fpr);
    6.94 +        ASSERT_EQ(found, nullptr);
    6.95 +        PEP_comm_type ct = PEP_ct_unknown;
    6.96 +        status = get_key_rating(session, curr_ident->ident->fpr, &ct);
    6.97 +        ASSERT_EQ(ct, PEP_ct_OpenPGP_unconfirmed);    
    6.98 +        stringlist_add(second_keylist, strdup(curr_ident->ident->fpr));            
    6.99 +    }
   6.100 +    ASSERT_EQ(i, 4);
   6.101 +    ASSERT_EQ(curr_ident, nullptr);
   6.102 +    
   6.103 +    stringlist_t* curr_key = first_keylist;
   6.104 +    for (i = 0; i < 4; i++, curr_key = curr_key->next) {
   6.105 +        PEP_comm_type ct = PEP_ct_unknown;
   6.106 +        status = get_key_rating(session, curr_key->value, &ct);
   6.107 +        ASSERT_EQ(ct, PEP_ct_key_revoked);
   6.108 +    }
   6.109 +    
   6.110 +    // Ok, now we're going to delete all the keys, and then try to reimport.
   6.111 +    curr_key = first_keylist;
   6.112 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.113 +        status = delete_keypair(session, curr_key->value);
   6.114 +        ASSERT_EQ(status, PEP_STATUS_OK);
   6.115 +    }
   6.116 +    ASSERT_EQ(i, 4);
   6.117 +    ASSERT_EQ(curr_key, nullptr);
   6.118 +    
   6.119 +    curr_key = second_keylist;
   6.120 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.121 +        status = delete_keypair(session, curr_key->value);
   6.122 +        ASSERT_EQ(status, PEP_STATUS_OK);
   6.123 +    }
   6.124 +    ASSERT_EQ(i, 4);
   6.125 +    ASSERT_EQ(curr_key, nullptr);
   6.126 +    
   6.127 +    // Make sure we can't find them
   6.128 +    curr_key = first_keylist;
   6.129 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.130 +        PEP_comm_type ct = PEP_ct_unknown;
   6.131 +        status = get_key_rating(session, curr_key->value, &ct);
   6.132 +        ASSERT_EQ(status, PEP_KEY_NOT_FOUND);    
   6.133 +    }
   6.134 +    curr_key = second_keylist;
   6.135 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.136 +        PEP_comm_type ct = PEP_ct_unknown;
   6.137 +        status = get_key_rating(session, curr_key->value, &ct);
   6.138 +        ASSERT_EQ(status, PEP_KEY_NOT_FOUND);
   6.139 +    }
   6.140 +    
   6.141 +    
   6.142 +    // Reimport
   6.143 +    curr_key = revocations;
   6.144 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.145 +        status = import_key(session, curr_key->value, strlen(curr_key->value), NULL);
   6.146 +        ASSERT_EQ(status, PEP_KEY_IMPORTED);
   6.147 +    }
   6.148 +    ASSERT_EQ(i, 4);
   6.149 +    ASSERT_EQ(curr_key, nullptr);
   6.150 +    
   6.151 +    curr_key = keys;
   6.152 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.153 +        status = import_key(session, curr_key->value, strlen(curr_key->value), NULL);
   6.154 +        ASSERT_EQ(status, PEP_KEY_IMPORTED);
   6.155 +    }
   6.156 +    ASSERT_EQ(i, 4);
   6.157 +    ASSERT_EQ(curr_key, nullptr);
   6.158 +    
   6.159 +    // Check the revoked keys to be sure they are revoked
   6.160 +    curr_key = first_keylist;
   6.161 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.162 +        PEP_comm_type ct = PEP_ct_unknown;
   6.163 +        status = get_key_rating(session, curr_key->value, &ct);
   6.164 +        ASSERT_EQ(ct, PEP_ct_key_revoked);
   6.165 +        ASSERT_EQ(status, PEP_STATUS_OK);
   6.166 +    }
   6.167 +    // Check the imported keys to be sure they are OK
   6.168 +    curr_key = second_keylist;
   6.169 +    for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   6.170 +        PEP_comm_type ct = PEP_ct_unknown;
   6.171 +        status = get_key_rating(session, curr_key->value, &ct);
   6.172 +        ASSERT_EQ(ct, PEP_ct_OpenPGP_unconfirmed);
   6.173 +        ASSERT_EQ(status, PEP_STATUS_OK);
   6.174 +    }
   6.175 +}