mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 03:56:54 +02:00
make service objs dependent on zeroidc
This commit is contained in:
parent
0875fb5fe0
commit
91e9b736dd
4 changed files with 3 additions and 34 deletions
|
@ -128,7 +128,7 @@ zerotier-idtool: one
|
|||
|
||||
zerotier-cli: one
|
||||
|
||||
$(CORE_OBJS): zeroidc
|
||||
$(ONE_OBJS): zeroidc
|
||||
|
||||
libzerotiercore.a: $(CORE_OBJS)
|
||||
ar rcs libzerotiercore.a $(CORE_OBJS)
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "Node.hpp"
|
||||
#include "Peer.hpp"
|
||||
#include "Trace.hpp"
|
||||
#include "zeroidc.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
|
@ -551,8 +550,7 @@ Network::Network(const RuntimeEnvironment *renv,void *tPtr,uint64_t nwid,void *u
|
|||
_lastConfigUpdate(0),
|
||||
_destroyed(false),
|
||||
_netconfFailure(NETCONF_FAILURE_NONE),
|
||||
_portError(0),
|
||||
_idc(nullptr)
|
||||
_portError(0)
|
||||
{
|
||||
for(int i=0;i<ZT_NETWORK_MAX_INCOMING_UPDATES;++i)
|
||||
_incomingConfigChunks[i].ts = 0;
|
||||
|
@ -593,12 +591,6 @@ Network::Network(const RuntimeEnvironment *renv,void *tPtr,uint64_t nwid,void *u
|
|||
_portError = RR->node->configureVirtualNetworkPort(tPtr,_id,&_uPtr,ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_UP,&ctmp);
|
||||
_portInitialized = true;
|
||||
}
|
||||
|
||||
if (nconf->ssoEnabled) {
|
||||
if (_config.ssoVersion == 1) {
|
||||
// start sso handling for network
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Network::~Network()
|
||||
|
@ -606,12 +598,6 @@ Network::~Network()
|
|||
ZT_VirtualNetworkConfig ctmp;
|
||||
_externalConfig(&ctmp);
|
||||
|
||||
if (_idc) {
|
||||
zeroidc::zeroidc_stop(_idc);
|
||||
zeroidc::zeroidc_delete(_idc);
|
||||
_idc = nullptr;
|
||||
}
|
||||
|
||||
if (_destroyed) {
|
||||
// This is done in Node::leave() so we can pass tPtr properly
|
||||
//RR->node->configureVirtualNetworkPort((void *)0,_id,&_uPtr,ZT_VIRTUAL_NETWORK_CONFIG_OPERATION_DESTROY,&ctmp);
|
||||
|
@ -1573,18 +1559,6 @@ void Network::setAuthenticationRequired(const char* issuerURL, const char* centr
|
|||
Utils::scopy(_config.ssoClientID, sizeof(_config.ssoClientID), clientID);
|
||||
Utils::scopy(_config.ssoNonce, sizeof(_config.ssoNonce), nonce);
|
||||
Utils::scopy(_config.ssoState, sizeof(_config.ssoState), state);
|
||||
|
||||
// TODO: propaagte to full flow module
|
||||
if (!this->_idc) {
|
||||
this->_idc = zeroidc::zeroidc_new(_config.authenticationURL, _config.ssoClientID, _config.centralAuthURL, 9993);
|
||||
zeroidc::zeroidc_start(this->_idc);
|
||||
}
|
||||
|
||||
zeroidc::AuthInfo *info = zeroidc::zeroidc_get_auth_info(this->_idc, _config.ssoState, _config.ssoNonce);
|
||||
const char* url = zeroidc::zeroidc_get_auth_url(info);
|
||||
if (url != NULL) {
|
||||
fprintf(stderr, "full auth URL: %s\n", url);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
#define ZT_NETWORK_MAX_INCOMING_UPDATES 3
|
||||
#define ZT_NETWORK_MAX_UPDATE_CHUNKS ((ZT_NETWORKCONFIG_DICT_CAPACITY / 1024) + 1)
|
||||
|
||||
namespace zeroidc {
|
||||
typedef struct ZeroIDC ZeroIDC;
|
||||
}
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
class RuntimeEnvironment;
|
||||
|
@ -468,8 +464,6 @@ private:
|
|||
Mutex _lock;
|
||||
|
||||
AtomicCounter __refCount;
|
||||
|
||||
zeroidc::ZeroIDC *_idc;
|
||||
};
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
|
|
@ -3,6 +3,7 @@ name = "zeroidc"
|
|||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
build = "build.rs"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
crate-type = ["staticlib","rlib"]
|
||||
|
|
Loading…
Add table
Reference in a new issue