|
@ -12,6 +12,7 @@ |
|
|
// Engine
|
|
|
// Engine
|
|
|
#include <pEp/key_reset.h> |
|
|
#include <pEp/key_reset.h> |
|
|
#include <pEp/message_api.h> |
|
|
#include <pEp/message_api.h> |
|
|
|
|
|
#include <pEp/mixnet.h> |
|
|
#include <pEp/sync_api.h> |
|
|
#include <pEp/sync_api.h> |
|
|
#include <pEp/echo_api.h> |
|
|
#include <pEp/echo_api.h> |
|
|
#include <pEp/status_to_string.h> |
|
|
#include <pEp/status_to_string.h> |
|
@ -406,7 +407,7 @@ namespace pEp { |
|
|
(void(Message::Blob::*)(string)) & Message::Blob::filename, |
|
|
(void(Message::Blob::*)(string)) & Message::Blob::filename, |
|
|
"filename of object in Blob"); |
|
|
"filename of object in Blob"); |
|
|
|
|
|
|
|
|
((PyTypeObject *)(void *)blob_class.ptr())->tp_as_buffer = &Message::Blob::bp; |
|
|
//((PyTypeObject *)(void *)blob_class.ptr())->tp_as_buffer = &Message::Blob::bp;
|
|
|
|
|
|
|
|
|
auto message_class = class_<Message>( |
|
|
auto message_class = class_<Message>( |
|
|
"Message", |
|
|
"Message", |
|
@ -593,6 +594,31 @@ namespace pEp { |
|
|
" keys a list of keys being used\n" |
|
|
" keys a list of keys being used\n" |
|
|
" rating the rating of the message as integer\n" |
|
|
" rating the rating of the message as integer\n" |
|
|
" flags flags set while decryption\n") |
|
|
" flags flags set while decryption\n") |
|
|
|
|
|
.def( |
|
|
|
|
|
"onionize", |
|
|
|
|
|
(Message(Message::*)(boost::python::list)) & |
|
|
|
|
|
Message::onionize) |
|
|
|
|
|
.def( |
|
|
|
|
|
"onionize", |
|
|
|
|
|
(Message(Message::*)(boost::python::list, boost::python::list)) & |
|
|
|
|
|
Message::onionize) |
|
|
|
|
|
.def( |
|
|
|
|
|
"onionize", |
|
|
|
|
|
(Message(Message::*)(boost::python::list, boost::python::list, int)) & |
|
|
|
|
|
Message::onionize) |
|
|
|
|
|
.def( |
|
|
|
|
|
"onionize", |
|
|
|
|
|
(Message(Message::*)(boost::python::list, boost::python::list, int, int)) & |
|
|
|
|
|
Message::onionize, |
|
|
|
|
|
"msg2 = msg1.onionize(relays, extra_keys = [], enc_format = 4, flags = 0)\n" |
|
|
|
|
|
"\n" |
|
|
|
|
|
"returns a copy of the message onionized with the given relay identities\n" |
|
|
|
|
|
" relays a list of identities to use as relays\n" |
|
|
|
|
|
" extra_keys a list of additional FPRs to encrypt the innermost message with" |
|
|
|
|
|
" enc_format the encryption format, as in encrypt. Only\n" |
|
|
|
|
|
" recent formats are supported.\n" |
|
|
|
|
|
" flags flags, as in encrypt. Do not use onionisation flag\n" |
|
|
|
|
|
" msg2 the resulting onionized message\n") |
|
|
.add_property( |
|
|
.add_property( |
|
|
"outgoing_rating", |
|
|
"outgoing_rating", |
|
|
&Message::outgoing_rating, |
|
|
&Message::outgoing_rating, |
|
@ -712,6 +738,16 @@ namespace pEp { |
|
|
"own_identity the sender identity\n" |
|
|
"own_identity the sender identity\n" |
|
|
"other_identity the recipient identity\n"); |
|
|
"other_identity the recipient identity\n"); |
|
|
|
|
|
|
|
|
|
|
|
def("onion_identities", |
|
|
|
|
|
&onion_identities, |
|
|
|
|
|
"onion_identities(trusted_no, total_no)\n" |
|
|
|
|
|
"\n" |
|
|
|
|
|
"Return a list of total_no known identities suitable to use as\n" |
|
|
|
|
|
"onion-routing relays, of which at least trusted_no are trusted.\n" |
|
|
|
|
|
"The returned identities are all distinct and in random order.\n" |
|
|
|
|
|
"\n" |
|
|
|
|
|
"identities = onion_identities(2, 5)\n"); |
|
|
|
|
|
|
|
|
// message API
|
|
|
// message API
|
|
|
|
|
|
|
|
|
enum_<PEP_rating>("rating") |
|
|
enum_<PEP_rating>("rating") |
|
|