diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-03-19 15:39:33 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-03-19 15:39:33 +0000 |
commit | c210b6ff1ef66fd972c40bcc07db28231099e7b4 (patch) | |
tree | f274afcfff721976a71b3389f373ab759c8e5fa3 /cpp/src/Ice/MessageAuthenticator.cpp | |
parent | Updated the properties added to the SSL extension, and those added for (diff) | |
download | ice-c210b6ff1ef66fd972c40bcc07db28231099e7b4.tar.bz2 ice-c210b6ff1ef66fd972c40bcc07db28231099e7b4.tar.xz ice-c210b6ff1ef66fd972c40bcc07db28231099e7b4.zip |
Removed the SUDP implementation (for now). See the tag sudp in CVS to
recover.
Diffstat (limited to 'cpp/src/Ice/MessageAuthenticator.cpp')
-rw-r--r-- | cpp/src/Ice/MessageAuthenticator.cpp | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/cpp/src/Ice/MessageAuthenticator.cpp b/cpp/src/Ice/MessageAuthenticator.cpp deleted file mode 100644 index 42207fbdcfa..00000000000 --- a/cpp/src/Ice/MessageAuthenticator.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2002 -// MutableRealms, Inc. -// Huntsville, AL, USA -// -// All Rights Reserved -// -// ********************************************************************** - -#include <Ice/MessageAuthenticator.h> - -using Ice::ByteSeq; - -void ::IceInternal::incRef(::SecureUdp::MessageAuthenticator* p) { p->__incRef(); } -void ::IceInternal::decRef(::SecureUdp::MessageAuthenticator* p) { p->__decRef(); } - -SecureUdp::MessageAuthenticator::MessageAuthenticator() -{ - // TODO: Should generate a random MAC key here - - // Bogus MAC - gotta fix this. - _macKeyBytes.push_back(2); - _macKeyBytes.push_back(0); - _macKeyBytes.push_back(0); - _macKeyBytes.push_back(2); - _macKeyBytes.push_back(0); - _macKeyBytes.push_back(1); - _macKeyBytes.push_back(1); - _macKeyBytes.push_back(7); - _macKeyBytes.push_back(1); - _macKeyBytes.push_back(0); - _macKeyBytes.push_back(2); - _macKeyBytes.push_back(2); -} - -SecureUdp::MessageAuthenticator::MessageAuthenticator(const ByteSeq& macKey) -{ - _macKeyBytes = macKey; -} - -SecureUdp::MessageAuthenticator::~MessageAuthenticator() -{ -} - -ByteSeq -SecureUdp::MessageAuthenticator::computeMAC(const ByteSeq& message) const -{ - // TODO: Should generate a REAL MAC here. - ByteSeq bytes; - - // Bogus MAC - gotta fix this. - bytes.push_back(2); - bytes.push_back(0); - bytes.push_back(0); - bytes.push_back(2); - bytes.push_back(0); - bytes.push_back(1); - bytes.push_back(1); - bytes.push_back(7); - bytes.push_back(1); - bytes.push_back(0); - bytes.push_back(2); - bytes.push_back(2); - - return bytes; -} - -bool -SecureUdp::MessageAuthenticator::authenticate(const ByteSeq& message, const ByteSeq& macCode) -{ - ByteSeq targetMAC = computeMAC(message); - return targetMAC == macCode; -} - -const ByteSeq& -SecureUdp::MessageAuthenticator::getMACKey() const -{ - return _macKeyBytes; -} - |