1 /*****************************************************************************\
3 * Name : cromp_security *
4 * Author : Chris Koeritz *
6 *******************************************************************************
7 * Copyright (c) 2002-$now By Author. This program is free software; you can *
8 * redistribute it and/or modify it under the terms of the GNU General Public *
9 * License as published by the Free Software Foundation; either version 2 of *
10 * the License or (at your option) any later version. This is online at: *
11 * http://www.fsf.org/copyleft/gpl.html *
12 * Please send any updates to: fred@gruntose.com *
13 \*****************************************************************************/
15 #include "cromp_security.h"
16 #include "cromp_server.h"
18 #include <basis/functions.h>
19 #include <octopus/entity_defs.h>
20 #include <sockets/internet_address.h>
21 #include <sockets/machine_uid.h>
22 #include <sockets/tcpip_stack.h>
24 using namespace basis;
25 using namespace octopi;
26 using namespace sockets;
27 //using namespace basis;
31 //#define DEBUG_CROMP_SECURITY
32 // uncomment if you want the noisier version.
35 #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
37 cromp_security::cromp_security()
38 : _stack(new tcpip_stack)
42 cromp_security::~cromp_security()
47 bool cromp_security::add_entity(const octopus_entity &client,
48 const byte_array &verification)
50 #ifdef DEBUG_CROMP_SECURITY
51 FUNCDEF("add_entity");
52 LOG(astring("adding ") + client.mangled_form());
54 return simple_entity_registry::add_entity(client, verification);