C++11 library providing functionality common to all adapters.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

// This file is under GNU General Public License 3.0
// see LICENSE.txt
#include <iostream>
#include <fstream>
#include <sstream>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include "framework.hh"
#include <passphrase_cache.hh>
#include <status_to_string.hh>
#include <Adapter.hh>
#include <pEp/message_api.h>
#include <pEp/keymanagement.h>
#include <pEp/key_reset.h>
using namespace pEp;
using namespace std;
int main(int argc, char** argv)
Test::setup(argc, argv);
const char* bob_filename = ENGINE_TEST
const char* bob_fpr = "5C76378A62B04CF3F41BEC8D4940FC9FA1878736";
const char* erwin_filename = ENGINE_TEST "/test_keys/erwin_normal_encrypted.pgp";
const char* erwin_fpr = "CBA968BC01FCEB89F04CCF155C5E9E3F0420A570";
::pEp_identity* bob = ::new_identity("bob@example.org", bob_fpr, "BOB", "Bob Dog");
::PEP_STATUS status = ::set_own_key(Adapter::session(), bob, bob_fpr);
assert(status == PEP_STATUS_OK);
::pEp_identity* erwin = ::new_identity("erwin@example.org", erwin_fpr, "BOB", "Bob is Erwin");
status = ::set_own_key(Adapter::session(), erwin, erwin_fpr);
assert(status == PEP_STATUS_OK);
status = ::key_reset_all_own_keys(Adapter::session());
assert(status == PEP_STATUS_OK);
// session(Adapter::release);
return 0;