|
|
|
@ -3,6 +3,7 @@
@@ -3,6 +3,7 @@
|
|
|
|
|
#ifdef _MSC_VER |
|
|
|
|
#include <stdlib.h> |
|
|
|
|
#endif |
|
|
|
|
#include <boost/lexical_cast.hpp> |
|
|
|
|
#include "base64.h" |
|
|
|
|
#include "Identity.h" |
|
|
|
|
#include "Log.h" |
|
|
|
@ -245,6 +246,8 @@ namespace client
@@ -245,6 +246,8 @@ namespace client
|
|
|
|
|
SendMessageReply (SAM_SESSION_CREATE_DUPLICATED_ID, strlen(SAM_SESSION_CREATE_DUPLICATED_ID), true); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// create destination
|
|
|
|
|
m_Session = m_Owner.CreateSession (id, destination == SAM_VALUE_TRANSIENT ? "" : destination, ¶ms); |
|
|
|
|
if (m_Session) |
|
|
|
|
{ |
|
|
|
@ -642,7 +645,18 @@ namespace client
@@ -642,7 +645,18 @@ namespace client
|
|
|
|
|
localDestination = i2p::client::context.CreateNewLocalDestination (keys, true, params); |
|
|
|
|
} |
|
|
|
|
else // transient
|
|
|
|
|
localDestination = i2p::client::context.CreateNewLocalDestination (false, i2p::data::SIGNING_KEY_TYPE_DSA_SHA1, params); |
|
|
|
|
{ |
|
|
|
|
// extract signature type
|
|
|
|
|
i2p::data::SigningKeyType signatureType = i2p::data::SIGNING_KEY_TYPE_DSA_SHA1; |
|
|
|
|
if (params) |
|
|
|
|
{ |
|
|
|
|
auto it = params->find (SAM_PARAM_SIGNATURE_TYPE); |
|
|
|
|
if (it != params->end ()) |
|
|
|
|
// TODO: extract string values
|
|
|
|
|
signatureType = boost::lexical_cast<int> (it->second); |
|
|
|
|
} |
|
|
|
|
localDestination = i2p::client::context.CreateNewLocalDestination (false, signatureType, params); |
|
|
|
|
} |
|
|
|
|
if (localDestination) |
|
|
|
|
{ |
|
|
|
|
SAMSession session; |
|
|
|
|