Browse Source

Justus's binary key patch for 770 test

IOS-2327
parent
commit
56fee080b7
3 changed files with 88 additions and 0 deletions
  1. +28
    -0
      test/src/ImportKeyTest.cc
  2. +60
    -0
      test/test_keys/770_priv.asc
  3. BIN
      test/test_keys/770_priv.pgp

+ 28
- 0
test/src/ImportKeyTest.cc View File

@ -326,3 +326,31 @@ TEST_F(ImportKeyTest, check_non_cleared_list_usage) {
ASSERT_EQ(changes, 0xEABFF); // (938 << 10 | 1023) -> 11101010101111111111 = 0xEABFF
free_stringlist(keylist);
}
TEST_F(ImportKeyTest, check_770_import_priv_asc) {
PEP_STATUS status = PEP_STATUS_OK;
string pubkey = slurp("test_keys/770_priv.asc");
stringlist_t* keylist = NULL;
status = _import_key_with_fpr_return(session, pubkey.c_str(), pubkey.size(), NULL, &keylist, NULL);
ASSERT_EQ(status, PEP_KEY_IMPORTED);
ASSERT_NE(keylist, nullptr);
ASSERT_STREQ(keylist->value, "0521111E12084FDEA58A38E880D9FB378DCC789D");
ASSERT_EQ(keylist->next, nullptr);
// FIXME, check key is actually imported
}
TEST_F(ImportKeyTest, check_770_import_priv_pgp) {
PEP_STATUS status = PEP_STATUS_OK;
string pubkey = slurp("test_keys/770_priv.pgp");
stringlist_t* keylist = NULL;
status = _import_key_with_fpr_return(session, pubkey.c_str(), pubkey.size(), NULL, &keylist, NULL);
ASSERT_EQ(status, PEP_KEY_IMPORTED);
ASSERT_NE(keylist, nullptr);
ASSERT_STREQ(keylist->value, "0521111E12084FDEA58A38E880D9FB378DCC789D");
ASSERT_EQ(keylist->next, nullptr);
// FIXME, check key is actually imported
}

+ 60
- 0
test/test_keys/770_priv.asc View File

@ -0,0 +1,60 @@
-----BEGIN PGP PRIVATE KEY BLOCK-----
lQPGBF8BfrABCACkJOcCxWjVk/ouBCz6RnSF7sZLZ8PAZTMQT9vJtboL6N2xR+7B
/SAzfTMcv+oU5A3Kd/k9dGA/p4wS3gXxkKaaUza1tjpWTDl92hVpxwOp7ZYczg1O
rB6EWhG1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