diff options
Diffstat (limited to 'cpp')
26 files changed, 1654 insertions, 667 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 066a9a2ad77..3b614fccb9f 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -14,8 +14,8 @@ # protocol. Otherwise TCP is used. # -#protocol = "ssl" -protocol = "" +protocol = "ssl" +# protocol = "" # # Set the host to the host name the test servers are running on. If not diff --git a/cpp/slice/Ice/SecureUdp.ice b/cpp/slice/Ice/SecureUdp.ice index f95bc643fe5..70f1cb52940 100644 --- a/cpp/slice/Ice/SecureUdp.ice +++ b/cpp/slice/Ice/SecureUdp.ice @@ -35,7 +35,7 @@ interface ServerChannel { void clientHello(ClientChannel client, Ice::ByteSeq MACkey); - void clientKeyAcknowledge(long clientID, long msgID); + void clientKeyAcknowledge(long clientID, long msgID, Ice::ByteSeq key); void clientKeyRequest(long clientID); diff --git a/cpp/src/Ice/CryptKey.cpp b/cpp/src/Ice/CryptKey.cpp new file mode 100644 index 00000000000..3dd16371587 --- /dev/null +++ b/cpp/src/Ice/CryptKey.cpp @@ -0,0 +1,50 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/CryptKey.h>
+
+using Ice::ByteSeq;
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::CryptKey* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::CryptKey* p) { p->__decRef(); }
+
+IceSecurity::SecureUdp::CryptKey::CryptKey(const ByteSeq& key) :
+ _keyBytes(key)
+{
+}
+
+IceSecurity::SecureUdp::CryptKey::~CryptKey()
+{
+}
+
+const ByteSeq&
+IceSecurity::SecureUdp::CryptKey::toByteSeq() const
+{
+ return _keyBytes;
+}
+
+bool
+IceSecurity::SecureUdp::CryptKey::operator == (const CryptKey& key) const
+{
+ return _keyBytes == key._keyBytes;
+}
+
+bool
+IceSecurity::SecureUdp::CryptKey::operator != (const CryptKey& key) const
+{
+ return !operator==(key);
+}
+
+bool
+IceSecurity::SecureUdp::CryptKey::operator < (const CryptKey& key) const
+{
+ return _keyBytes < key._keyBytes;
+}
+
diff --git a/cpp/src/Ice/CryptKey.h b/cpp/src/Ice/CryptKey.h new file mode 100644 index 00000000000..f7d9660c37d --- /dev/null +++ b/cpp/src/Ice/CryptKey.h @@ -0,0 +1,63 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPT_KEY_H
+#define ICE_CRYPT_KEY_H
+
+#include <IceUtil/Shared.h>
+#include <Ice/Stream.h>
+#include <Ice/CryptKeyF.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceUtil::Shared;
+using Ice::ByteSeq;
+
+class CryptKey : public Shared
+{
+
+public:
+ CryptKey(const ByteSeq&);
+ virtual ~CryptKey();
+
+ virtual const ByteSeq& toByteSeq() const;
+
+ //
+ // Compare CryptKeys for sorting purposes
+ //
+ virtual bool operator==(const CryptKey&) const;
+ virtual bool operator!=(const CryptKey&) const;
+ virtual bool operator<(const CryptKey&) const;
+
+protected:
+ ByteSeq _keyBytes;
+
+};
+
+inline bool operator==(const CryptKey& cryptKey, const CryptKeyPtr& cryptKeyPtr)
+{
+ return (cryptKey == *(cryptKeyPtr.get()));
+}
+
+inline bool operator==(const CryptKeyPtr& cryptKeyPtr, const CryptKey& cryptKey)
+{
+ return (cryptKey == *(cryptKeyPtr.get()));
+}
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/CryptKeyF.h b/cpp/src/Ice/CryptKeyF.h new file mode 100644 index 00000000000..afa6b426095 --- /dev/null +++ b/cpp/src/Ice/CryptKeyF.h @@ -0,0 +1,38 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPT_KEY_F_H
+#define ICE_CRYPT_KEY_F_H
+
+#include <Ice/Handle.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+class CryptKey;
+typedef IceInternal::Handle<CryptKey> CryptKeyPtr;
+
+}
+
+}
+
+namespace IceInternal
+{
+
+void incRef(::IceSecurity::SecureUdp::CryptKey*);
+void decRef(::IceSecurity::SecureUdp::CryptKey*);
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/Cryptor.cpp b/cpp/src/Ice/Cryptor.cpp new file mode 100644 index 00000000000..4dd48abaea3 --- /dev/null +++ b/cpp/src/Ice/Cryptor.cpp @@ -0,0 +1,103 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Cryptor.h>
+#include <Ice/CryptKey.h>
+#include <algorithm>
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::Cryptor* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::Cryptor* p) { p->__decRef(); }
+
+using Ice::ByteSeq;
+using IceSecurity::SecureUdp::CryptKey;
+using IceSecurity::SecureUdp::CryptKeyPtr;
+
+IceSecurity::SecureUdp::Cryptor::Cryptor()
+{
+}
+
+IceSecurity::SecureUdp::Cryptor::~Cryptor()
+{
+}
+
+const CryptKeyPtr
+IceSecurity::SecureUdp::Cryptor::getNewKey()
+{
+ // Gotta return a newly generated key here.
+ ByteSeq byteSeq;
+ int i = 0;
+
+ // Bogus key - gotta fix this.
+ byteSeq[i++] = 'A';
+ byteSeq[i++] = 'n';
+ byteSeq[i++] = 't';
+ byteSeq[i++] = 'h';
+ byteSeq[i++] = 'o';
+ byteSeq[i++] = 'n';
+ byteSeq[i++] = 'y';
+ byteSeq[i++] = 'D';
+ byteSeq[i++] = 'a';
+ byteSeq[i++] = 'r';
+ byteSeq[i++] = 'i';
+ byteSeq[i++] = 'u';
+ byteSeq[i++] = 's';
+
+ CryptKeyPtr cryptKey = new CryptKey(byteSeq);
+
+ _cryptKeys.push_back(cryptKey);
+
+ return cryptKey;
+}
+
+const CryptKeyPtr
+IceSecurity::SecureUdp::Cryptor::getKey(const ByteSeq& key)
+{
+ CryptKeyPtr cryptKey = new CryptKey(key);
+
+ CryptKeys::iterator begin = _cryptKeys.begin();
+ CryptKeys::iterator end = _cryptKeys.end();
+ CryptKeys::iterator pos = std::find(begin, end, cryptKey);
+
+ if (pos == end)
+ {
+ // TODO: Exception - Trying to use a key that we didn't hand out.
+ }
+
+ return *pos;
+}
+
+const CryptKeyPtr
+IceSecurity::SecureUdp::Cryptor::getOrCreateKey(const ByteSeq& key)
+{
+ CryptKeyPtr cryptKey;
+
+ cryptKey = getKey(key);
+
+ if (cryptKey == 0)
+ {
+ cryptKey = new CryptKey(key);
+
+ _cryptKeys.push_back(cryptKey);
+ }
+
+ return cryptKey;
+}
+
+void
+IceSecurity::SecureUdp::Cryptor::encrypt(const CryptKeyPtr& key, const ByteSeq& plainBuffer, ByteSeq& encryptedBuffer)
+{
+ encryptedBuffer = plainBuffer;
+}
+
+void
+IceSecurity::SecureUdp::Cryptor::decrypt(const CryptKeyPtr& key, const ByteSeq& encryptedBuffer, ByteSeq& plainBuffer)
+{
+ plainBuffer = encryptedBuffer;
+}
diff --git a/cpp/src/Ice/Cryptor.h b/cpp/src/Ice/Cryptor.h new file mode 100644 index 00000000000..0d52b0bb69b --- /dev/null +++ b/cpp/src/Ice/Cryptor.h @@ -0,0 +1,58 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPTOR_H
+#define ICE_CRYPTOR_H
+
+#include <IceUtil/Shared.h>
+#include <Ice/Stream.h>
+#include <Ice/CryptKeyF.h>
+#include <Ice/CryptorF.h>
+#include <vector>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceUtil::Shared;
+using Ice::ByteSeq;
+
+typedef std::vector<CryptKeyPtr> CryptKeys;
+
+class Cryptor : public Shared
+{
+
+public:
+ Cryptor();
+ virtual ~Cryptor();
+
+ virtual const CryptKeyPtr getNewKey();
+
+ virtual const CryptKeyPtr getKey(const ByteSeq&);
+
+ virtual const CryptKeyPtr getOrCreateKey(const ByteSeq&);
+
+ virtual void encrypt(const CryptKeyPtr&, const ByteSeq&, ByteSeq&);
+
+ virtual void decrypt(const CryptKeyPtr&, const ByteSeq&, ByteSeq&);
+
+protected:
+ CryptKeys _cryptKeys;
+
+};
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/CryptorF.h b/cpp/src/Ice/CryptorF.h new file mode 100644 index 00000000000..48ff44f5799 --- /dev/null +++ b/cpp/src/Ice/CryptorF.h @@ -0,0 +1,38 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_CRYPTOR_F_H
+#define ICE_CRYPTOR_F_H
+
+#include <Ice/Handle.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+class Cryptor;
+typedef IceInternal::Handle<Cryptor> CryptorPtr;
+
+}
+
+}
+
+namespace IceInternal
+{
+
+void incRef(::IceSecurity::SecureUdp::Cryptor*);
+void decRef(::IceSecurity::SecureUdp::Cryptor*);
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index db74e036b80..73791ce573c 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -89,6 +89,10 @@ OBJS = Initialize.o \ SslSystemOpenSSL.o \ SslTempCerts.o \ UdpTransceiver.o \ + Cryptor.o \ + CryptKey.o \ + MessageAuthenticator.o \ + SUdpClient.o \ SUdpTransceiver.o \ SUdpControlChannel.o \ SUdpServerControlChannel.o \ diff --git a/cpp/src/Ice/MessageAuthenticator.cpp b/cpp/src/Ice/MessageAuthenticator.cpp new file mode 100644 index 00000000000..7c8763e83dc --- /dev/null +++ b/cpp/src/Ice/MessageAuthenticator.cpp @@ -0,0 +1,83 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/MessageAuthenticator.h>
+
+using Ice::ByteSeq;
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::MessageAuthenticator* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::MessageAuthenticator* p) { p->__decRef(); }
+
+IceSecurity::SecureUdp::MessageAuthenticator::MessageAuthenticator()
+{
+ // TODO: Should generate a random MAC key here
+ int i = 0;
+
+ // Bogus MAC - gotta fix this.
+ _macKeyBytes[i++] = 2;
+ _macKeyBytes[i++] = 0;
+ _macKeyBytes[i++] = 0;
+ _macKeyBytes[i++] = 2;
+ _macKeyBytes[i++] = 0;
+ _macKeyBytes[i++] = 1;
+ _macKeyBytes[i++] = 1;
+ _macKeyBytes[i++] = 7;
+ _macKeyBytes[i++] = 1;
+ _macKeyBytes[i++] = 0;
+ _macKeyBytes[i++] = 2;
+ _macKeyBytes[i++] = 2;
+}
+
+IceSecurity::SecureUdp::MessageAuthenticator::MessageAuthenticator(const ByteSeq& macKey)
+{
+ _macKeyBytes = macKey;
+}
+
+IceSecurity::SecureUdp::MessageAuthenticator::~MessageAuthenticator()
+{
+}
+
+ByteSeq
+IceSecurity::SecureUdp::MessageAuthenticator::computeMAC(const ByteSeq& message) const
+{
+ // TODO: Should generate a REAL MAC here.
+ ByteSeq bytes;
+ int i = 0;
+
+ // Bogus MAC - gotta fix this.
+ bytes[i++] = 2;
+ bytes[i++] = 0;
+ bytes[i++] = 0;
+ bytes[i++] = 2;
+ bytes[i++] = 0;
+ bytes[i++] = 1;
+ bytes[i++] = 1;
+ bytes[i++] = 7;
+ bytes[i++] = 1;
+ bytes[i++] = 0;
+ bytes[i++] = 2;
+ bytes[i++] = 2;
+
+ return bytes;
+}
+
+bool
+IceSecurity::SecureUdp::MessageAuthenticator::authenticate(const ByteSeq& message, const ByteSeq& macCode)
+{
+ ByteSeq targetMAC = computeMAC(message);
+ return targetMAC == macCode;
+}
+
+const ByteSeq&
+IceSecurity::SecureUdp::MessageAuthenticator::getMACKey() const
+{
+ return _macKeyBytes;
+}
+
diff --git a/cpp/src/Ice/MessageAuthenticator.h b/cpp/src/Ice/MessageAuthenticator.h new file mode 100644 index 00000000000..c6190da5ce2 --- /dev/null +++ b/cpp/src/Ice/MessageAuthenticator.h @@ -0,0 +1,51 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_MESSAGE_AUTHENTICATOR_H
+#define ICE_MESSAGE_AUTHENTICATOR_H
+
+#include <IceUtil/Shared.h>
+#include <Ice/Stream.h>
+#include <Ice/MessageAuthenticatorF.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceUtil::Shared;
+using Ice::ByteSeq;
+
+class MessageAuthenticator : public Shared
+{
+
+public:
+ MessageAuthenticator();
+ MessageAuthenticator(const ByteSeq&);
+ virtual ~MessageAuthenticator();
+
+ virtual ByteSeq computeMAC(const ByteSeq&) const;
+
+ virtual bool authenticate(const ByteSeq&, const ByteSeq&);
+
+ virtual const ByteSeq& getMACKey() const;
+
+protected:
+ ByteSeq _macKeyBytes;
+
+};
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/MessageAuthenticatorF.h b/cpp/src/Ice/MessageAuthenticatorF.h new file mode 100644 index 00000000000..ed81c123004 --- /dev/null +++ b/cpp/src/Ice/MessageAuthenticatorF.h @@ -0,0 +1,38 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_MESSAGE_AUTHENTICATOR_F_H
+#define ICE_MESSAGE_AUTHENTICATOR_F_H
+
+#include <Ice/Handle.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+class MessageAuthenticator;
+typedef IceInternal::Handle<MessageAuthenticator> MessageAuthenticatorPtr;
+
+}
+
+}
+
+namespace IceInternal
+{
+
+void incRef(::IceSecurity::SecureUdp::MessageAuthenticator*);
+void decRef(::IceSecurity::SecureUdp::MessageAuthenticator*);
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpClient.cpp b/cpp/src/Ice/SUdpClient.cpp new file mode 100644 index 00000000000..cd6fe898fe5 --- /dev/null +++ b/cpp/src/Ice/SUdpClient.cpp @@ -0,0 +1,83 @@ +// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/SUdpClient.h>
+#include <Ice/CryptKey.h>
+#include <Ice/MessageAuthenticator.h>
+
+using Ice::Long;
+using IceSecurity::SecureUdp::CryptKeyPtr;
+using IceSecurity::SecureUdp::MessageAuthenticatorPtr;
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::SUdpClient* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::SUdpClient* p) { p->__decRef(); }
+
+IceSecurity::SecureUdp::SUdpClient::SUdpClient(Long clientID,
+ const ClientChannelPtr& clientChannel,
+ const MessageAuthenticatorPtr& messageAuthenticator) :
+ _clientID(clientID),
+ _clientChannel(clientChannel),
+ _messageAuthenticator(messageAuthenticator)
+{
+}
+
+IceSecurity::SecureUdp::SUdpClient::~SUdpClient()
+{
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverHello(const CryptKeyPtr& key)
+{
+ _clientChannel->serverHello(_clientID, key->toByteSeq());
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverKeyChange(const CryptKeyPtr& key)
+{
+ _clientChannel->serverKeyChange(key->toByteSeq());
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverGoodbye()
+{
+ _clientChannel->serverGoodbye();
+}
+
+Long
+IceSecurity::SecureUdp::SUdpClient::getClientID() const
+{
+ return _clientID;
+}
+
+const CryptKeyPtr&
+IceSecurity::SecureUdp::SUdpClient::getCryptKey() const
+{
+ return _cryptKey;
+}
+
+const CryptKeyPtr&
+IceSecurity::SecureUdp::SUdpClient::getCryptKey(Long msgID) const
+{
+ // TODO: Must be able to return a CryptKey based on a msgID
+ return _cryptKey;
+}
+
+const MessageAuthenticatorPtr&
+IceSecurity::SecureUdp::SUdpClient::getMessageAuthenticator() const
+{
+ return _messageAuthenticator;
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::setNewCryptKey(Long msgID, const CryptKeyPtr& cryptKey)
+{
+ _cryptKey = cryptKey;
+}
+
diff --git a/cpp/src/Ice/SUdpClient.h b/cpp/src/Ice/SUdpClient.h new file mode 100644 index 00000000000..3c4f113749f --- /dev/null +++ b/cpp/src/Ice/SUdpClient.h @@ -0,0 +1,66 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_CLIENT_H
+#define ICE_SUDP_CLIENT_H
+
+#include <Ice/SecureUdp.h>
+#include <IceUtil/Shared.h>
+#include <Ice/SUdpClientF.h>
+#include <Ice/MessageAuthenticatorF.h>
+#include <Ice/CryptKeyF.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using Ice::Long;
+using Ice::ByteSeq;
+using IceUtil::Shared;
+
+class SUdpClient : public Shared
+{
+
+public:
+ SUdpClient(Long, const ClientChannelPtr&, const MessageAuthenticatorPtr&);
+ virtual ~SUdpClient();
+
+ void serverHello(const CryptKeyPtr&);
+
+ void serverKeyChange(const CryptKeyPtr&);
+
+ void serverGoodbye();
+
+ void setNewCryptKey(Long, const CryptKeyPtr&);
+
+ Long getClientID() const;
+
+ const CryptKeyPtr& getCryptKey() const;
+ const CryptKeyPtr& getCryptKey(Long) const;
+
+ const MessageAuthenticatorPtr& getMessageAuthenticator() const;
+
+protected:
+ Long _clientID;
+ ClientChannelPtr _clientChannel;
+ MessageAuthenticatorPtr _messageAuthenticator;
+ CryptKeyPtr _cryptKey;
+
+};
+
+}
+
+}
+
+#endif
+
+
diff --git a/cpp/src/Ice/SUdpClientControlChannel.cpp b/cpp/src/Ice/SUdpClientControlChannel.cpp index 869bba92c0e..51bbb8333fc 100644 --- a/cpp/src/Ice/SUdpClientControlChannel.cpp +++ b/cpp/src/Ice/SUdpClientControlChannel.cpp @@ -1,92 +1,188 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <Ice/SUdpClientControlChannel.h> -#include <Ice/Instance.h> -#include <Ice/Communicator.h> -#include <Ice/ObjectAdapter.h> -#include <Ice/IdentityUtil.h> -#include <Ice/SUdpTransceiver.h> -#include <sstream> - -using namespace std; -using namespace Ice; -using namespace IceSecurity::SecureUdp; - -void -IceSecurity::SecureUdp::ClientControlChannel::serverHello(Long clientID, const ByteSeq& key, const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->serverHello(clientID, key); - } -} - -void -IceSecurity::SecureUdp::ClientControlChannel::serverKeyChange(const ByteSeq& key, const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->serverKeyChange(key); - } -} - -void -IceSecurity::SecureUdp::ClientControlChannel::serverGoodbye(const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->serverGoodbye(); - } -} - -IceSecurity::SecureUdp::ClientControlChannel::ClientControlChannel(const SUdpTransceiverPtr& transceiver, - const InstancePtr& instance, - const std::string& host, - int port) : - ControlChannel(transceiver, instance), - _host(host), - _port(port) -{ - // Create the Client Channel's name - ostringstream objectName; - objectName << "sudpClient" << hex << (void *) this; - - // This MUST be an SSL endpoint - secure handshake takes place over this. - ostringstream endpt; - endpt << "ssl"; - - // Create the ObjectAdapter's name - ostringstream objectAdapterName; - objectAdapterName << "sudpClientControl" << hex << (void *) this; - - Ice::CommunicatorPtr communicator = _instance->communicator(); - - // Create our ObjectAdapter - _adapter = communicator->createObjectAdapterWithEndpoints(objectAdapterName.str(), endpt.str()); - - // The client control channel is the implementaion. - ClientChannelPtr clientChannel = this; - - _adapter->add(clientChannel, Ice::stringToIdentity(objectName.str())); - - // Okay, allow the object to begin accepting requests - _adapter->activate(); -} - -IceSecurity::SecureUdp::ClientControlChannel::~ClientControlChannel() -{ - // Make it impossible for the control channel to access the Transceiver - // after transceiver destruction. - unsetTransceiver(); -} +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Stream.h>
+#include <Ice/SUdpClientControlChannel.h>
+#include <Ice/Instance.h>
+#include <Ice/Communicator.h>
+#include <Ice/ObjectAdapter.h>
+#include <Ice/IdentityUtil.h>
+#include <Ice/SUdpTransceiver.h>
+#include <Ice/MessageAuthenticator.h>
+#include <Ice/Cryptor.h>
+#include <Ice/CryptKey.h>
+#include <sstream>
+
+using namespace std;
+using namespace Ice;
+using namespace IceSecurity::SecureUdp;
+using IceInternal::BasicStream;
+
+////////////////////////////////////////////////////////////////////////////////
+// Public Incoming Methods (from Ice Client Control Channel)
+////////////////////////////////////////////////////////////////////////////////
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::serverHello(Long clientID, const ByteSeq& key, const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ _clientID = clientID;
+
+ serverKeyChange(key);
+}
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::serverKeyChange(const ByteSeq& key, const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ serverKeyChange(key);
+}
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::serverGoodbye(const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ // TODO: Should find some way to shut down the Transceiver here.
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Protected Methods
+////////////////////////////////////////////////////////////////////////////////
+
+IceSecurity::SecureUdp::ClientControlChannel::ClientControlChannel(const SUdpTransceiverPtr& transceiver,
+ const InstancePtr& instance,
+ const std::string& host,
+ int port) :
+ ControlChannel(transceiver, instance)
+{
+ // Create the Client Channel's name
+ ostringstream objectName;
+ objectName << "sudpClient" << hex << (void *) this;
+
+ // This MUST be an SSL endpoint - secure handshake takes place over this.
+ ostringstream endpt;
+ endpt << "ssl";
+
+ // Create the ObjectAdapter's name
+ ostringstream objectAdapterName;
+ objectAdapterName << "sudpClientControl" << hex << (void *) this;
+
+ Ice::CommunicatorPtr communicator = _instance->communicator();
+
+ // Create our ObjectAdapter
+ _adapter = communicator->createObjectAdapterWithEndpoints(objectAdapterName.str(), endpt.str());
+
+ // The client control channel is the implementaion.
+ ClientChannelPtr clientChannel = this;
+
+ _adapter->add(clientChannel, Ice::stringToIdentity(objectName.str()));
+
+ // Okay, allow the object to begin accepting requests
+ _adapter->activate();
+
+ // Create our connection to the Server channel
+ ostringstream ref;
+ ref << "sudpServer" << dec << port << ":ssl -p " << dec << port << " -h " << host;
+ Ice::ObjectPrx base = communicator->stringToProxy(ref.str());
+ ServerChannelPrx twoway = ServerChannelPrx::checkedCast(base);
+ _serverChannel = ServerChannelPrx::uncheckedCast(twoway->ice_oneway());
+
+ _messageAuthenticator = new MessageAuthenticator();
+
+ _clientID = 0L;
+ _msgID = 0L;
+
+ clientHello();
+}
+
+IceSecurity::SecureUdp::ClientControlChannel::~ClientControlChannel()
+{
+ // Make it impossible for the control channel to access the Transceiver
+ // after transceiver destruction.
+ unsetTransceiver();
+}
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::serverKeyChange(const ByteSeq& key)
+{
+ Long msgID = _msgID + 1;
+
+ // From this msgID onwards, use the indicated key
+ _encryptionKey = _cryptor->getOrCreateKey(key);
+
+ _serverChannel->clientKeyAcknowledge(_clientID, msgID, _encryptionKey->toByteSeq());
+}
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::clientHello()
+{
+ _serverChannel->clientHello(ClientChannelPtr(this), _messageAuthenticator->getMACKey());
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// Incoming Methods (from SUdpTransceiver)
+////////////////////////////////////////////////////////////////////////////////
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::encryptPacket(Buffer& buffer, Buffer& encryptedPacket)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ // We always, and ONLY, increment here.
+ ++_msgID;
+
+ Long messageLength = buffer.b.end() - buffer.b.begin();
+
+ // 1. Compute the MAC
+ ByteSeq macBuffer = _messageAuthenticator->computeMAC(buffer.b);
+
+ // 2. Append MAC to Message, produce signed message
+ BasicStream signedMessageStream(0);
+ signedMessageStream.write(messageLength);
+ signedMessageStream.write(buffer.b);
+ signedMessageStream.write(macBuffer);
+
+ // 3. Encrypt signed message
+ ByteSeq signedMessage;
+ ByteSeq encryptedMessage;
+ signedMessageStream.read(signedMessage);
+ _cryptor->encrypt(_encryptionKey, signedMessage, encryptedMessage);
+
+ // 4. Create record header
+ BasicStream headerStream(0);
+ Byte version = 1;
+ Long length = encryptedMessage.end() - encryptedMessage.begin();
+ headerStream.write(version);
+ headerStream.write(_clientID);
+ headerStream.write(_msgID);
+ headerStream.write(length);
+
+ // 5. Prepend header to encrypted message, create SUDP Packet
+ BasicStream sudpPacket(0);
+ ByteSeq header;
+ headerStream.read(header);
+ sudpPacket.write(header);
+ sudpPacket.write(encryptedMessage);
+
+ // Pass the encrypted packet back.
+ sudpPacket.read(encryptedPacket.b);
+}
+
+void
+IceSecurity::SecureUdp::ClientControlChannel::clientKeyRequest()
+{
+ _serverChannel->clientKeyRequest(_clientID);
+}
+
+
diff --git a/cpp/src/Ice/SUdpClientControlChannel.h b/cpp/src/Ice/SUdpClientControlChannel.h index 84b512e304c..c58fa722ff6 100644 --- a/cpp/src/Ice/SUdpClientControlChannel.h +++ b/cpp/src/Ice/SUdpClientControlChannel.h @@ -1,56 +1,83 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef ICE_SUDP_CLIENT_CONTROL_CHANNEL_H -#define ICE_SUDP_CLIENT_CONTROL_CHANNEL_H - -#include <Ice/SUdpControlChannel.h> -#include <Ice/SecureUdp.h> - -namespace IceSecurity -{ - -namespace SecureUdp -{ - -using IceInternal::SUdpTransceiver; -using Ice::Long; -using Ice::ByteSeq; -using Ice::Current; - -class ClientControlChannel : public ControlChannel, public ClientChannel -{ - -public: - - virtual void serverHello(Long, const ByteSeq&, const Current&); - - virtual void serverKeyChange(const ByteSeq&, const Current&); - - virtual void serverGoodbye(const Current&); - -protected: - - ClientControlChannel(const SUdpTransceiverPtr&, const InstancePtr&, const std::string&, int); - - virtual ~ClientControlChannel(); - - friend IceInternal::SUdpTransceiver; - - std::string _host; - int _port; - Ice::ObjectAdapterPtr _adapter; -}; - -} - -} - -#endif +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_CLIENT_CONTROL_CHANNEL_H
+#define ICE_SUDP_CLIENT_CONTROL_CHANNEL_H
+
+#include <Ice/SUdpControlChannel.h>
+#include <Ice/SecureUdp.h>
+#include <Ice/Buffer.h>
+#include <Ice/CryptKeyF.h>
+#include <Ice/MessageAuthenticatorF.h>
+
+namespace IceInternal
+{
+
+// class SUdpTransceiverPtr;
+
+}
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceInternal::SUdpTransceiver;
+using IceInternal::Buffer;
+using Ice::Long;
+using Ice::ByteSeq;
+using Ice::Current;
+
+
+class ClientControlChannel : public ControlChannel, public ClientChannel
+{
+
+public:
+
+ // Messages received from the Server
+ virtual void serverHello(Long, const ByteSeq&, const Current&);
+ virtual void serverKeyChange(const ByteSeq&, const Current&);
+ virtual void serverGoodbye(const Current&);
+
+
+protected:
+
+ ClientControlChannel(const SUdpTransceiverPtr&, const InstancePtr&, const std::string&, int);
+
+ virtual ~ClientControlChannel();
+
+ void serverKeyChange(const ByteSeq&);
+ void clientHello();
+
+
+ friend IceInternal::SUdpTransceiver;
+
+ // Called from the SUdpTransceiver
+ void encryptPacket(Buffer&, Buffer&);
+ void clientKeyRequest();
+
+
+ Ice::ObjectAdapterPtr _adapter;
+ ServerChannelPrx _serverChannel;
+
+ Long _msgID;
+ Long _clientID;
+ CryptKeyPtr _encryptionKey;
+
+ MessageAuthenticatorPtr _messageAuthenticator;
+};
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpClientF.h b/cpp/src/Ice/SUdpClientF.h new file mode 100644 index 00000000000..63c3d552a33 --- /dev/null +++ b/cpp/src/Ice/SUdpClientF.h @@ -0,0 +1,38 @@ +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_CLIENT_F_H
+#define ICE_SUDP_CLIENT_F_H
+
+#include <Ice/Handle.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+class SUdpClient;
+typedef IceInternal::Handle<SUdpClient> SUdpClientPtr;
+
+}
+
+}
+
+namespace IceInternal
+{
+
+void incRef(::IceSecurity::SecureUdp::SUdpClient*);
+void decRef(::IceSecurity::SecureUdp::SUdpClient*);
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpControlChannel.cpp b/cpp/src/Ice/SUdpControlChannel.cpp index ecf711ed119..5d397669827 100644 --- a/cpp/src/Ice/SUdpControlChannel.cpp +++ b/cpp/src/Ice/SUdpControlChannel.cpp @@ -1,39 +1,40 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <Ice/SUdpControlChannel.h> -#include <Ice/Instance.h> - -using namespace std; -using namespace Ice; - -void IceInternal::incRef(::IceSecurity::SecureUdp::ControlChannel* p) { p->__incRef(); } -void IceInternal::decRef(::IceSecurity::SecureUdp::ControlChannel* p) { p->__decRef(); } - -IceSecurity::SecureUdp::ControlChannel::ControlChannel(const SUdpTransceiverPtr& transceiver, - const InstancePtr& instance) : - _transceiver(transceiver), - _instance(instance) -{ - assert(transceiver); -} - -IceSecurity::SecureUdp::ControlChannel::~ControlChannel() -{ - unsetTransceiver(); -} - -void -IceSecurity::SecureUdp::ControlChannel::unsetTransceiver() -{ - IceUtil::Mutex::Lock sync(_mutex); - _transceiver = 0; -} - +// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/SUdpControlChannel.h>
+#include <Ice/Instance.h>
+
+using namespace std;
+using namespace Ice;
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::ControlChannel* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::ControlChannel* p) { p->__decRef(); }
+
+IceSecurity::SecureUdp::ControlChannel::ControlChannel(const SUdpTransceiverPtr& transceiver,
+ const InstancePtr& instance) :
+ _transceiver(transceiver),
+ _instance(instance)
+{
+ assert(transceiver);
+}
+
+IceSecurity::SecureUdp::ControlChannel::~ControlChannel()
+{
+ unsetTransceiver();
+}
+
+void
+IceSecurity::SecureUdp::ControlChannel::unsetTransceiver()
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+ _transceiver = 0;
+}
+
+
diff --git a/cpp/src/Ice/SUdpControlChannel.h b/cpp/src/Ice/SUdpControlChannel.h index 7986b86780c..4dc28e4e1dd 100644 --- a/cpp/src/Ice/SUdpControlChannel.h +++ b/cpp/src/Ice/SUdpControlChannel.h @@ -1,52 +1,54 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef ICE_SUDP_CONTROL_CHANNEL_H -#define ICE_SUDP_CONTROL_CHANNEL_H - -#include <Ice/InstanceF.h> -#include <IceUtil/Shared.h> -#include <IceUtil/Mutex.h> -#include <Ice/SUdpControlChannelF.h> -#include <Ice/SUdpTransceiverF.h> - -namespace IceSecurity -{ - -namespace SecureUdp -{ - -using IceInternal::SUdpTransceiverPtr; -using IceInternal::InstancePtr; -using IceUtil::Shared; -using IceUtil::Mutex; - -class ControlChannel : public virtual Shared -{ - -protected: - - ControlChannel(const SUdpTransceiverPtr&, const InstancePtr&); - virtual ~ControlChannel(); - - virtual void unsetTransceiver(); - - friend IceInternal::SUdpTransceiver; - - SUdpTransceiverPtr _transceiver; - InstancePtr _instance; - Mutex _mutex; -}; - -} - -} - -#endif +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_CONTROL_CHANNEL_H
+#define ICE_SUDP_CONTROL_CHANNEL_H
+
+#include <Ice/InstanceF.h>
+#include <IceUtil/Shared.h>
+#include <IceUtil/Mutex.h>
+#include <Ice/SUdpControlChannelF.h>
+#include <Ice/SUdpTransceiverF.h>
+#include <Ice/CryptorF.h>
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+using IceInternal::SUdpTransceiverPtr;
+using IceInternal::InstancePtr;
+using IceUtil::Shared;
+using IceUtil::Mutex;
+
+class ControlChannel : public virtual Shared
+{
+
+protected:
+ ControlChannel(const SUdpTransceiverPtr&, const InstancePtr&);
+ virtual ~ControlChannel();
+
+ virtual void unsetTransceiver();
+
+ friend IceInternal::SUdpTransceiver;
+
+ SUdpTransceiverPtr _transceiver;
+ InstancePtr _instance;
+ Mutex _mutex;
+ CryptorPtr _cryptor;
+};
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpControlChannelF.h b/cpp/src/Ice/SUdpControlChannelF.h index 4ee25ced4ad..d2b21bf95f8 100644 --- a/cpp/src/Ice/SUdpControlChannelF.h +++ b/cpp/src/Ice/SUdpControlChannelF.h @@ -20,29 +20,18 @@ namespace SecureUdp { class ControlChannel; - -} - -} - -namespace IceInternal -{ - -void incRef(::IceSecurity::SecureUdp::ControlChannel*); -void decRef(::IceSecurity::SecureUdp::ControlChannel*); - -} - -namespace IceSecurity -{ - -namespace SecureUdp -{ - typedef IceInternal::Handle<ControlChannel> ControlChannelPtr; } } +namespace IceInternal
+{
+
+void incRef(::IceSecurity::SecureUdp::ControlChannel*);
+void decRef(::IceSecurity::SecureUdp::ControlChannel*);
+
+}
+
#endif diff --git a/cpp/src/Ice/SUdpServerControlChannel.cpp b/cpp/src/Ice/SUdpServerControlChannel.cpp index fde3b25eccc..fc3b25d4018 100644 --- a/cpp/src/Ice/SUdpServerControlChannel.cpp +++ b/cpp/src/Ice/SUdpServerControlChannel.cpp @@ -1,107 +1,221 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <Ice/SUdpServerControlChannel.h> -#include <Ice/Instance.h> -#include <Ice/Communicator.h> -#include <Ice/ObjectAdapter.h> -#include <Ice/IdentityUtil.h> -#include <Ice/SUdpTransceiver.h> -#include <sstream> - -using namespace std; -using namespace Ice; -using namespace IceSecurity::SecureUdp; - -void -IceSecurity::SecureUdp::ServerControlChannel::clientHello(const ClientChannelPtr& client, - const ByteSeq& MACkey, - const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->clientHello(client, MACkey); - } -} - -void -IceSecurity::SecureUdp::ServerControlChannel::clientKeyAcknowledge(Long clientID, - Long msgID, - const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->clientKeyAcknowledge(clientID, msgID); - } -} - -void -IceSecurity::SecureUdp::ServerControlChannel::clientKeyRequest(Long clientID, - const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->clientKeyRequest(clientID); - } -} - -void -IceSecurity::SecureUdp::ServerControlChannel::clientGoodbye(Long clientID, - const Current&) -{ - IceUtil::Mutex::Lock sync(_mutex); - if (_transceiver != 0) - { - _transceiver->clientGoodbye(clientID); - } -} - -IceSecurity::SecureUdp::ServerControlChannel::ServerControlChannel(const SUdpTransceiverPtr& transceiver, - const InstancePtr& instance, - int port) : - ControlChannel(transceiver, instance), - _port(port) -{ - // Create the Server Channel's name - ostringstream objectName; - objectName << "sudpServer" << dec << _port; - - // This MUST be an SSL endpoint - secure handshake take place over this. - ostringstream endpt; - endpt << "ssl -p " << dec << _port; - - // Create the ObjectAdapter's name - ostringstream objectAdapterName; - objectAdapterName << "sudpServerControl" << dec << _port; - - Ice::CommunicatorPtr communicator = _instance->communicator(); - - // Create our ObjectAdapter - _adapter = communicator->createObjectAdapterWithEndpoints(objectAdapterName.str(), endpt.str()); - - // The server control channel is the implemenation. - ServerChannelPtr serverChannel = this; - - _adapter->add(serverChannel, Ice::stringToIdentity(objectName.str())); - - // Okay, allow the object to begin accepting requests - _adapter->activate(); -} - -IceSecurity::SecureUdp::ServerControlChannel::~ServerControlChannel() -{ - // Make it impossible for the control channel to access the Transceiver - // after transceiver destruction. - unsetTransceiver(); -} - +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Buffer.h>
+#include <Ice/SUdpServerControlChannel.h>
+#include <Ice/SUdpClient.h>
+#include <Ice/Instance.h>
+#include <Ice/Communicator.h>
+#include <Ice/ObjectAdapter.h>
+#include <Ice/IdentityUtil.h>
+#include <Ice/SUdpTransceiver.h>
+#include <Ice/MessageAuthenticator.h>
+#include <Ice/Cryptor.h>
+#include <Ice/BasicStream.h>
+#include <sstream>
+
+using namespace std;
+using namespace Ice;
+using namespace IceSecurity::SecureUdp;
+using IceInternal::Buffer;
+using IceInternal::BasicStream;
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::clientHello(const ClientChannelPtr& client,
+ const ByteSeq& MACkey,
+ const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ Long clientID = getNewClientID();
+
+ MessageAuthenticatorPtr messageAuthenticator = new MessageAuthenticator(MACkey);
+
+ SUdpClientPtr sudpClient = new SUdpClient(clientID, client, messageAuthenticator);
+
+ CryptKeyPtr cryptKey = _cryptor->getNewKey();
+
+ sudpClient->serverHello(cryptKey);
+
+ newSUdpClient(sudpClient);
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::clientKeyAcknowledge(Long clientID,
+ Long msgID,
+ const ByteSeq& key,
+ const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ SUdpClientPtr sudpClient = getSUdpClient(clientID);
+
+ CryptKeyPtr cryptKey = _cryptor->getKey(key);
+
+ sudpClient->setNewCryptKey(msgID, cryptKey);
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::clientKeyRequest(Long clientID, const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ SUdpClientPtr sudpClient = getSUdpClient(clientID);
+
+ CryptKeyPtr cryptKey = _cryptor->getNewKey();
+
+ sudpClient->serverKeyChange(cryptKey);
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::clientGoodbye(Long clientID, const Current&)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ deleteSUdpClient(clientID);
+}
+
+IceSecurity::SecureUdp::ServerControlChannel::ServerControlChannel(const SUdpTransceiverPtr& transceiver,
+ const InstancePtr& instance,
+ int port) :
+ ControlChannel(transceiver, instance)
+{
+ _clientIDGenerator = 0L;
+
+ // Create the Server Channel's name
+ ostringstream objectName;
+ objectName << "sudpServer" << dec << port;
+
+ // This MUST be an SSL endpoint - secure handshake take place over this.
+ ostringstream endpt;
+ endpt << "ssl -p " << dec << port;
+
+ // Create the ObjectAdapter's name
+ ostringstream objectAdapterName;
+ objectAdapterName << "sudpServerControl" << dec << port;
+
+ Ice::CommunicatorPtr communicator = _instance->communicator();
+
+ // Create our ObjectAdapter
+ _adapter = communicator->createObjectAdapterWithEndpoints(objectAdapterName.str(), endpt.str());
+
+ // The server control channel is the implemenation.
+ ServerChannelPtr serverChannel = this;
+
+ _adapter->add(serverChannel, Ice::stringToIdentity(objectName.str()));
+
+ // Okay, allow the object to begin accepting requests
+ _adapter->activate();
+}
+
+IceSecurity::SecureUdp::ServerControlChannel::~ServerControlChannel()
+{
+ // Make it impossible for the control channel to access the Transceiver
+ // after transceiver destruction.
+ unsetTransceiver();
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::decryptPacket(Buffer& encryptedPacket, Buffer& decryptedPacket)
+{
+ IceUtil::Mutex::Lock sync(_mutex);
+
+ // Header information at the beginning of the packet.
+ Byte version;
+ Long clientID;
+ Long msgID;
+ Long length;
+
+ // The encrypted message, final portion of the packet.
+ ByteSeq encryptedMessage;
+
+
+ // 1. Break apart header and encrypted Message
+ BasicStream sudpPacket(0);
+ sudpPacket.read(version);
+ sudpPacket.read(clientID);
+ sudpPacket.read(msgID);
+ sudpPacket.read(length);
+ sudpPacket.read(encryptedMessage);
+
+ // TODO: Perform version check here.
+
+ // Check to make sure the encrypted message is the correct length
+ Long messageLength = encryptedMessage.end() - encryptedMessage.begin();
+ if (messageLength != length)
+ {
+ // TODO: Bad scene, this message is not the right length!
+ }
+
+
+ // 2. Decrypt the Encrypted message
+ ByteSeq signedMessage;
+ SUdpClientPtr sudpClient = getSUdpClient(clientID);
+ CryptKeyPtr cryptKey = sudpClient->getCryptKey(msgID);
+ _cryptor->decrypt(cryptKey, encryptedMessage, signedMessage);
+
+
+ // 3. Split out the message and MAC code from the signedMessage
+ // Note: We're reusing the messageLength variable here.
+ BasicStream signedMessageStream(0);
+ ByteSeq messageAndMAC;
+ signedMessageStream.write(signedMessage);
+ signedMessageStream.read(messageLength);
+ signedMessageStream.read(messageAndMAC);
+ ByteSeq::iterator current = messageAndMAC.begin();
+ ByteSeq::iterator macPos = current + messageLength;
+ ByteSeq::iterator end = messageAndMAC.end();
+ ByteSeq message(current, macPos);
+ ByteSeq macCode(macPos, end);
+
+
+ // 4. Compute MAC and compare
+ MessageAuthenticatorPtr messageAuthenticator = sudpClient->getMessageAuthenticator();
+ if (messageAuthenticator->authenticate(message, macCode))
+ {
+ // TODO: Bad scene, the MAC codes don't match, this message is invalid!
+ }
+
+ decryptedPacket.b = message;
+}
+
+Long
+IceSecurity::SecureUdp::ServerControlChannel::getNewClientID()
+{
+ IceUtil::Mutex::Lock sync(_clientIDMutex);
+ return ++_clientIDGenerator;
+}
+
+SUdpClientPtr&
+IceSecurity::SecureUdp::ServerControlChannel::getSUdpClient(Long clientID)
+{
+ IceUtil::Mutex::Lock sync(_clientMapMutex);
+
+ return _clientMap[clientID];
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::newSUdpClient(const SUdpClientPtr& sudpClient)
+{
+ IceUtil::Mutex::Lock sync(_clientMapMutex);
+
+ pair<Long, SUdpClientPtr> clientPair(sudpClient->getClientID(), sudpClient);
+
+ _clientMap.insert(clientPair);
+}
+
+void
+IceSecurity::SecureUdp::ServerControlChannel::deleteSUdpClient(Long clientID)
+{
+ IceUtil::Mutex::Lock sync(_clientMapMutex);
+
+ _clientMap.erase(clientID);
+}
+
diff --git a/cpp/src/Ice/SUdpServerControlChannel.h b/cpp/src/Ice/SUdpServerControlChannel.h index 7a403caf918..10b0a88ecb4 100644 --- a/cpp/src/Ice/SUdpServerControlChannel.h +++ b/cpp/src/Ice/SUdpServerControlChannel.h @@ -1,53 +1,92 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef ICE_SUDP_SERVER_CONTROL_CHANNEL_H -#define ICE_SUDP_SERVER_CONTROL_CHANNEL_H - -#include <Ice/SUdpControlChannel.h> -#include <Ice/SecureUdp.h> - -namespace IceSecurity -{ - -namespace SecureUdp -{ - -using IceInternal::SUdpTransceiver; - -class ServerControlChannel : public ControlChannel, public ServerChannel -{ - -public: - virtual void clientHello(const ClientChannelPtr&, const ::Ice::ByteSeq&, const ::Ice::Current&); - - virtual void clientKeyAcknowledge(::Ice::Long, ::Ice::Long, const ::Ice::Current&); - - virtual void clientKeyRequest(::Ice::Long, const ::Ice::Current&); - - virtual void clientGoodbye(::Ice::Long, const ::Ice::Current&); - -protected: - - ServerControlChannel(const SUdpTransceiverPtr&, const InstancePtr&, int); - - virtual ~ServerControlChannel(); - - friend IceInternal::SUdpTransceiver; - - int _port; - Ice::ObjectAdapterPtr _adapter; -}; - -} - -} - -#endif +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_SERVER_CONTROL_CHANNEL_H
+#define ICE_SUDP_SERVER_CONTROL_CHANNEL_H
+
+#include <Ice/SUdpControlChannel.h>
+#include <Ice/SecureUdp.h>
+#include <IceUtil/Mutex.h>
+#include <Ice/Buffer.h>
+#include <Ice/SUdpClientF.h>
+#include <map>
+
+namespace IceInternal
+{
+
+// class SUdpTransceiverPtr;
+
+}
+
+namespace IceSecurity
+{
+
+namespace SecureUdp
+{
+
+// typedef pair<Long, CryptKeyPtr> MsgKeyPair;
+// typedef vector<MsgKeyPair> MsgKeyVector;
+
+// Encryption key and historical list
+// MsgKeyVector _msgEncryptionKeys;
+// MsgKeyPair _currentEncryptionInfo;
+
+using IceInternal::Buffer;
+using IceInternal::SUdpTransceiver;
+using Ice::ObjectAdapterPtr;
+using Ice::Long;
+using Ice::ByteSeq;
+using Ice::Current;
+
+typedef std::map<Long, SUdpClientPtr> SUdpClientMap;
+
+class ServerControlChannel : public ControlChannel, public ServerChannel
+{
+
+public:
+
+ // Messages received from Client
+ virtual void clientHello(const ClientChannelPtr&, const ByteSeq&, const Current&);
+ virtual void clientKeyAcknowledge(Long, Long, const ByteSeq&, const Current&);
+ virtual void clientKeyRequest(Long, const Current&);
+ virtual void clientGoodbye(Long, const Current&);
+
+protected:
+
+ ServerControlChannel(const SUdpTransceiverPtr&, const InstancePtr&, int);
+
+ virtual ~ServerControlChannel();
+
+ friend IceInternal::SUdpTransceiver;
+
+ void decryptPacket(Buffer&, Buffer&);
+ Long getNewClientID();
+
+ SUdpClientPtr& getSUdpClient(Long);
+ void newSUdpClient(const SUdpClientPtr&);
+ void deleteSUdpClient(Long);
+
+ ObjectAdapterPtr _adapter;
+
+ // Keep a listing of all clients connected to us.
+ SUdpClientMap _clientMap;
+ Mutex _clientMapMutex;
+
+ // Generate unique Client ID numbers
+ Long _clientIDGenerator;
+ Mutex _clientIDMutex;
+};
+
+}
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpTransceiver.cpp b/cpp/src/Ice/SUdpTransceiver.cpp index 2cefdefee85..a062877bb6b 100644 --- a/cpp/src/Ice/SUdpTransceiver.cpp +++ b/cpp/src/Ice/SUdpTransceiver.cpp @@ -1,159 +1,115 @@ -// ********************************************************************** -// -// Copyright (c) 2001 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <Ice/SUdpTransceiver.h> -#include <Ice/Instance.h> -#include <Ice/TraceLevels.h> -#include <Ice/Logger.h> -#include <Ice/Buffer.h> -#include <Ice/Network.h> -#include <Ice/Exception.h> -#include <Ice/SUdpClientControlChannel.h> -#include <Ice/SUdpServerControlChannel.h> - -using namespace std; -using namespace Ice; -using namespace IceInternal; -using namespace IceSecurity::SecureUdp; - -void IceInternal::incRef(SUdpTransceiver* p) { p->__incRef(); } -void IceInternal::decRef(SUdpTransceiver* p) { p->__decRef(); } - -SOCKET -IceInternal::SUdpTransceiver::fd() -{ - return _udpTransceiver.fd(); -} - -void -IceInternal::SUdpTransceiver::close() -{ - _udpTransceiver.close(); -} - -void -IceInternal::SUdpTransceiver::shutdown() -{ - _udpTransceiver.shutdown(); -} - -void -IceInternal::SUdpTransceiver::write(Buffer& buf, int) -{ - _udpTransceiver.write(buf,0); -} - -void -IceInternal::SUdpTransceiver::read(Buffer& buf, int) -{ - _udpTransceiver.read(buf,0); -} - -string -IceInternal::SUdpTransceiver::toString() const -{ - return _udpTransceiver.toString(); -} - -bool -IceInternal::SUdpTransceiver::equivalent(const string& host, int port) const -{ - return _udpTransceiver.equivalent(host, port); -} - -int -IceInternal::SUdpTransceiver::effectivePort() -{ - return _udpTransceiver.effectivePort(); -} - -void -IceInternal::SUdpTransceiver::clientHello(const ClientChannelPtr& client, const ByteSeq& MACkey) -{ -} - -void -IceInternal::SUdpTransceiver::clientKeyAcknowledge(Long clientID, Long msgID) -{ -} - -void -IceInternal::SUdpTransceiver::clientKeyRequest(Long clientID) -{ -} - -void -IceInternal::SUdpTransceiver::clientGoodbye(Long clientID) -{ -} - -void -IceInternal::SUdpTransceiver::serverHello(Long clientID, const ByteSeq& key) -{ -} - -void -IceInternal::SUdpTransceiver::serverKeyChange(const ByteSeq& key) -{ -} - -void -IceInternal::SUdpTransceiver::serverGoodbye() -{ -} - -IceInternal::SUdpTransceiver::SUdpTransceiver(const InstancePtr& instance, const string& host, int port) : - _udpTransceiver(instance, host, port, "sudp"), - _instance(instance), - _traceLevels(instance->traceLevels()), - _logger(instance->logger()) -{ - // Perform our handshake with the server - connectControlChannel(host, port); -} - -IceInternal::SUdpTransceiver::SUdpTransceiver(const InstancePtr& instance, int port, bool connect) : - _udpTransceiver(instance, port, connect, "sudp"), - _instance(instance), - _traceLevels(instance->traceLevels()), - _logger(instance->logger()) -{ - // Build our control channel - createControlChannel(port); - - // Activate the control channel (begin taking connections) - activateControlChannel(); -} - -IceInternal::SUdpTransceiver::~SUdpTransceiver() -{ - // delete _controlChannel; - _controlChannel->unsetTransceiver(); -} - -void -IceInternal::SUdpTransceiver::connectControlChannel(const std::string& host, int port) -{ - // Create a control channel, one for this Client SUdp connection - _controlChannel = new ClientControlChannel(this, _instance, host, port); -} - -void -IceInternal::SUdpTransceiver::createControlChannel(int port) -{ - // Create a control channel, one for this Server SUdp connection - _controlChannel = new ServerControlChannel(this, _instance, port); -} - -void -IceInternal::SUdpTransceiver::activateControlChannel() -{ -} - +// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/SUdpTransceiver.h>
+#include <Ice/Instance.h>
+#include <Ice/TraceLevels.h>
+#include <Ice/Logger.h>
+#include <Ice/Buffer.h>
+#include <Ice/Network.h>
+#include <Ice/Exception.h>
+#include <Ice/SUdpClientControlChannel.h>
+#include <Ice/SUdpServerControlChannel.h>
+
+using namespace std;
+using namespace Ice;
+using namespace IceInternal;
+using namespace IceSecurity::SecureUdp;
+
+void IceInternal::incRef(SUdpTransceiver* p) { p->__incRef(); }
+void IceInternal::decRef(SUdpTransceiver* p) { p->__decRef(); }
+
+SOCKET
+IceInternal::SUdpTransceiver::fd()
+{
+ return _udpTransceiver.fd();
+}
+
+void
+IceInternal::SUdpTransceiver::close()
+{
+ _udpTransceiver.close();
+}
+
+void
+IceInternal::SUdpTransceiver::shutdown()
+{
+ _udpTransceiver.shutdown();
+}
+
+void
+IceInternal::SUdpTransceiver::write(Buffer& buf, int)
+{
+ _udpTransceiver.write(buf,0);
+}
+
+void
+IceInternal::SUdpTransceiver::read(Buffer& buf, int)
+{
+ _udpTransceiver.read(buf,0);
+}
+
+string
+IceInternal::SUdpTransceiver::toString() const
+{
+ return _udpTransceiver.toString();
+}
+
+bool
+IceInternal::SUdpTransceiver::equivalent(const string& host, int port) const
+{
+ return _udpTransceiver.equivalent(host, port);
+}
+
+int
+IceInternal::SUdpTransceiver::effectivePort()
+{
+ return _udpTransceiver.effectivePort();
+}
+
+IceInternal::SUdpTransceiver::SUdpTransceiver(const InstancePtr& instance, const string& host, int port) :
+ _udpTransceiver(instance, host, port, "sudp"),
+ _instance(instance),
+ _traceLevels(instance->traceLevels()),
+ _logger(instance->logger())
+{
+ // Perform our handshake with the server
+ connectControlChannel(host, port);
+}
+
+IceInternal::SUdpTransceiver::SUdpTransceiver(const InstancePtr& instance, int port, bool connect) :
+ _udpTransceiver(instance, port, connect, "sudp"),
+ _instance(instance),
+ _traceLevels(instance->traceLevels()),
+ _logger(instance->logger())
+{
+ // Build our control channel
+ createControlChannel(port);
+}
+
+IceInternal::SUdpTransceiver::~SUdpTransceiver()
+{
+ _controlChannel->unsetTransceiver();
+}
+
+void
+IceInternal::SUdpTransceiver::connectControlChannel(const string& host, int port)
+{
+ // Create a control channel, one for this Client SUdp connection
+ _controlChannel = new ClientControlChannel(this, _instance, host, port);
+}
+
+void
+IceInternal::SUdpTransceiver::createControlChannel(int port)
+{
+ // Create a control channel, one for this Server SUdp connection
+ _controlChannel = new ServerControlChannel(this, _instance, port);
+}
+
diff --git a/cpp/src/Ice/SUdpTransceiver.h b/cpp/src/Ice/SUdpTransceiver.h index aac1d48c219..491dbe86ef8 100644 --- a/cpp/src/Ice/SUdpTransceiver.h +++ b/cpp/src/Ice/SUdpTransceiver.h @@ -1,83 +1,85 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#ifndef ICE_SUDP_TRANSCEIVER_H -#define ICE_SUDP_TRANSCEIVER_H - -#include <Ice/InstanceF.h> -#include <Ice/TraceLevelsF.h> -#include <Ice/LoggerF.h> -#include <Ice/SUdpControlChannelF.h> -#include <Ice/SecureUdp.h> -#include <Ice/UdpTransceiver.h> -#include <Ice/SUdpTransceiverF.h> - -#ifndef WIN32 -# include <netinet/in.h> // For struct sockaddr_in -#endif - -namespace IceInternal -{ - -using Ice::ByteSeq; -using Ice::Long; -using IceSecurity::SecureUdp::ClientChannelPtr; -using IceSecurity::SecureUdp::ControlChannelPtr; - -class SUdpEndpoint; - -class SUdpTransceiver : public Transceiver -{ -public: - - virtual SOCKET fd(); - virtual void close(); - virtual void shutdown(); - virtual void write(Buffer&, int); - virtual void read(Buffer&, int); - virtual std::string toString() const; - - bool equivalent(const std::string&, int) const; - int effectivePort(); - - // Server Channel Implementation methods - void clientHello(const ClientChannelPtr&, const ByteSeq&); - void clientKeyAcknowledge(Long, Long); - void clientKeyRequest(Long); - void clientGoodbye(Long); - - // Client Channel Implementation methods - void serverHello(Long, const ByteSeq&); - void serverKeyChange(const ByteSeq&); - void serverGoodbye(); - -private: - - SUdpTransceiver(const InstancePtr&, const std::string&, int); - SUdpTransceiver(const InstancePtr&, int, bool); - virtual ~SUdpTransceiver(); - - friend class SUdpEndpoint; - - void connectControlChannel(const std::string&, int); - void createControlChannel(int); - void activateControlChannel(); - - UdpTransceiver _udpTransceiver; - ControlChannelPtr _controlChannel; - - InstancePtr _instance; - TraceLevelsPtr _traceLevels; - ::Ice::LoggerPtr _logger; -}; - -} - -#endif +// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SUDP_TRANSCEIVER_H
+#define ICE_SUDP_TRANSCEIVER_H
+
+#include <Ice/InstanceF.h>
+#include <Ice/TraceLevelsF.h>
+#include <Ice/LoggerF.h>
+#include <Ice/SUdpControlChannelF.h>
+#include <Ice/SecureUdp.h>
+#include <Ice/UdpTransceiver.h>
+#include <Ice/SUdpTransceiverF.h>
+#include <map>
+
+#ifndef WIN32
+# include <netinet/in.h> // For struct sockaddr_in
+#endif
+
+namespace IceInternal
+{
+
+using Ice::ByteSeq;
+using Ice::Long;
+using IceSecurity::SecureUdp::ClientChannelPtr;
+using IceSecurity::SecureUdp::ControlChannelPtr;
+
+class SUdpEndpoint;
+
+class SUdpTransceiver : public Transceiver
+{
+public:
+
+ virtual SOCKET fd();
+ virtual void close();
+ virtual void shutdown();
+ virtual void write(Buffer&, int);
+ virtual void read(Buffer&, int);
+ virtual std::string toString() const;
+
+ virtual bool equivalent(const std::string&, int) const;
+
+ int effectivePort();
+
+ // Server Channel Implementation methods
+ void clientHello(const ClientChannelPtr&, const ByteSeq&);
+ void clientKeyAcknowledge(Long, Long, const ByteSeq&);
+ void clientKeyRequest(Long);
+ void clientGoodbye(Long);
+
+ // Client Channel Implementation methods
+ void serverHello(Long, const ByteSeq&);
+ void serverKeyChange(const ByteSeq&);
+ void serverGoodbye();
+
+private:
+
+ SUdpTransceiver(const InstancePtr&, const std::string&, int);
+ SUdpTransceiver(const InstancePtr&, int, bool);
+ virtual ~SUdpTransceiver();
+
+ friend class SUdpEndpoint;
+
+ void connectControlChannel(const std::string&, int);
+ void createControlChannel(int);
+
+ UdpTransceiver _udpTransceiver;
+ ControlChannelPtr _controlChannel;
+
+ InstancePtr _instance;
+ TraceLevelsPtr _traceLevels;
+ ::Ice::LoggerPtr _logger;
+};
+
+}
+
+#endif
+
diff --git a/cpp/src/Ice/SUdpTransceiverF.h b/cpp/src/Ice/SUdpTransceiverF.h index a415e3e2686..f46bd48b8a8 100644 --- a/cpp/src/Ice/SUdpTransceiverF.h +++ b/cpp/src/Ice/SUdpTransceiverF.h @@ -19,7 +19,7 @@ namespace IceInternal class SUdpTransceiver; void incRef(SUdpTransceiver*); void decRef(SUdpTransceiver*); -typedef Handle<SUdpTransceiver> SUdpTransceiverPtr; +typedef IceInternal::Handle<SUdpTransceiver> SUdpTransceiverPtr; } diff --git a/cpp/src/Ice/ice.dsp b/cpp/src/Ice/ice.dsp index 7adadb7abda..4f934328839 100644 --- a/cpp/src/Ice/ice.dsp +++ b/cpp/src/Ice/ice.dsp @@ -25,7 +25,7 @@ CFG=Ice - Win32 Debug # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
-CPP=xicl6.exe
+CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
@@ -52,7 +52,7 @@ RSC=rc.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=xilink6.exe
+LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 ws2_32.lib libeay32.lib ssleay32.lib xerces-c_1.lib /nologo /dll /machine:I386 /out:"Release/ice001.dll"
# SUBTRACT LINK32 /pdb:none /debug /nodefaultlib
@@ -84,7 +84,7 @@ PostBuild_Cmds=copy Release\ice001.* ..\..\lib BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
-LINK32=xilink6.exe
+LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 ws2_32.lib libeay32.lib ssleay32.lib xerces-c_1D.lib /nologo /dll /debug /machine:I386 /out:"Debug/ice001d.dll" /pdbtype:sept
# SUBTRACT LINK32 /pdb:none /nodefaultlib
@@ -136,6 +136,14 @@ SOURCE=.\Connector.cpp # End Source File
# Begin Source File
+SOURCE=.\CryptKey.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Cryptor.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Current.cpp
# End Source File
# Begin Source File
@@ -192,6 +200,10 @@ SOURCE=.\LoggerI.cpp # End Source File
# Begin Source File
+SOURCE=.\MessageAuthenticator.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\Network.cpp
# End Source File
# Begin Source File
@@ -348,6 +360,10 @@ SOURCE=.\StreamI.cpp # End Source File
# Begin Source File
+SOURCE=.\SUdpClient.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\SUdpClientControlChannel.cpp
# End Source File
# Begin Source File
@@ -468,6 +484,22 @@ SOURCE=.\ConnectorF.h # End Source File
# Begin Source File
+SOURCE=.\CryptKey.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CryptKeyF.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\Cryptor.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\CryptorF.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\Ice\Current.h
# End Source File
# Begin Source File
@@ -556,6 +588,14 @@ SOURCE=.\LoggerI.h # End Source File
# Begin Source File
+SOURCE=.\MessageAuthenticator.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\MessageAuthenticatorF.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\include\Ice\Native.h
# End Source File
# Begin Source File
@@ -792,10 +832,18 @@ SOURCE=.\StreamI.h # End Source File
# Begin Source File
+SOURCE=.\SUdpClient.h
+# End Source File
+# Begin Source File
+
SOURCE=.\SUdpClientControlChannel.h
# End Source File
# Begin Source File
+SOURCE=.\SUdpClientF.h
+# End Source File
+# Begin Source File
+
SOURCE=.\SUdpControlChannel.h
# End Source File
# Begin Source File
|