In file /home/eternity/Source/Bank/Majordomo/H/majordomo.h:

class Majordomo : public SixMajordomo

Class responsible for handling messages comming to Bank

Inheritance:

Majordomo < SixMajordomo < Runable < Debugable


Public Methods

MsgField* Majordomo::ComputeMAC (MsgField *oAuth)
Computes MAC
Err Majordomo::CreateCipheredData ()
Creates ciphered data
GMessage* Majordomo::CreateSimpleFileToStor (GMessage *certificate)
Creates simple message with a file for storage
GMessage* Majordomo::CreateSimpleReqForFile (GMessage *pubKey)
Creates REQ_FOR_FILE
Err Majordomo::GenerateACID (ACID *acid)
Generates ID of certificate
Err Majordomo::GenerateACKeys (ACID *acid, GMessage **acPubKey)
Generates certificate key pair
Err Majordomo::GenerateAsymetricKey ()
Generates public and private keys
Err Majordomo::GenerateThisSixAC (MsgField *onion, GMessage **generatedAC)
Generates this Six AC
Err Majordomo::SwitchDataReceivedCommand (const Char *command, const MsgField *dataFld, const ACID acid)
Switches data_received command
Err Majordomo::SwitchDataReceivedCommand (const Char *command, const MsgField *dataFld, const ACID acid)
Chooses a method to handle the command with
Err Majordomo::SwitchMixCommand (MsgField *commandFld, MsgField *dataFld)
Chooses serving method for Mix command
MsgField* Majordomo::UnsealSAuth (const ACID myACID, const MsgField *sealSA)
Unseals sAuth

Public

methods
Majordomo (Bank * parent, LogFile * majordomoLogFile)
Bank Majordomo constructor
virtual ACManager* GetPtrToACManager (Char *type)
Overriden method that returns pointer to ACManager of specified type
Err Initialize ()
Some cool initialization
ESTime* GetTime ()
Returns current time
MsgField* UnsealSAuth (const ACID acid, const MsgField *sealSA)
Decrypts S_AUTH

Protected

methods

Methods managing access certificates
virtual MsgField* DecryptByACPriv (const ACID acid, const MsgField *dData)
Decrypting data from Service
virtual Err SwitchDataReceivedCommand (const Char *command, const MsgField *dataFld, const ACID acid)
Handle data_received command

Data_received commands handling methods

Inherited from SixMajordomo:

Public Methods

Err SixMajordomo::AskForOnion()
Err SixMajordomo::BeginTransaction(ID *newTID)
Err SixMajordomo::CommandDataReceived(MsgField *paramFld)
Err SixMajordomo::CommandOnionGenerated(MsgField *dataFld)
Err SixMajordomo::CommandTest(MsgField *dataFld)
GMessage* SixMajordomo::CreateGenerateOnionMsg(Size hopCount = CFG_HOPS_IN_AC)
GMessage* SixMajordomo::CreateGetACsMsg(Char *type, Int count)
GMessage* SixMajordomo::CreateNextACTimeOutMsg(Char *type)
GMessage* SixMajordomo::CreatePublishCertificateMsg(GMessage *ac)
GMessage* SixMajordomo::CreateSendDataMsg(Char *commandSer, GMessage *dataSer, GMessage *ac, Size hops)
GMessage* SixMajordomo::CreateTestMsg(MsgField *dataFld)
Err SixMajordomo::DRCTest(const MsgField *dataFld)
Err SixMajordomo::DecryptDataMsg(const GMessage *dataMsg, MsgField **decryptedBodyFld, ACID *acid)
Err SixMajordomo::EndTransaction(ID tid)
Err SixMajordomo::FeedSenderWithMsgForMix(GMessage *mixMsg)
Err SixMajordomo::FeedSenderWithOutMsgQueue()
Err SixMajordomo::FillReplyToInfo(GMessage *gMsg)
Err SixMajordomo::FillTest(GMessage *gMsg, MsgField *msgFld)
Err SixMajordomo::GenerateRequestForMissingACs(Char *acType)
GMessage* SixMajordomo::GetACByACID(Char *type, ACID acID)
Queue* SixMajordomo::GetACs(Char *type, const int count, Queue *notIn)
ID SixMajordomo::GetTID()
Err SixMajordomo::HandleDataReceivedBody(const MsgField *bodyFld, const ACID acid)
Err SixMajordomo::HandleGeneratedAC(GMessage *)
Void SixMajordomo::HandleMixMessage(GMessage *inMsg)
Err SixMajordomo::InsertAC(Char *type, GMessage *ac)
Err SixMajordomo::NextACTimeOut(Char *type, ESTime *t)
void* SixMajordomo::Run(void *)
SixMajordomo::SixMajordomo(Six * parent, LogFile * majordomoLogFile)
Err SixMajordomo::SwitchDataReceivedCommand(const Char *command, const MsgField *dataFld, const ACID acid)
Err SixMajordomo::SwitchDataReceivedVersion(const Char *version, const GMessage *body, const ACID acid)
Err SixMajordomo::SwitchMixCommand(MsgField *commandFld, MsgField *dataFld)
Err SixMajordomo::TestACCount(Char *type, Int *missing)
SixMajordomo::~SixMajordomo()

Protected

attributes

TID tID
transaction ID.
Queue* outMsgQueue
Queue with messages prepared to send to Mix.
TransactionManager* transactionManager
Object for managing transactions.

Inherited from Runable:

Public Methods

void Runable::MaskAllSignals()
Runable::Runable(LogFile * logFile)

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Inherited from SixOffspring:

Public Methods

SixOffspring::SixOffspring(Six * aSix)

Documentation

Class responsible for handling messages comming to Bank. This descendant of SixMajordomo takes main functionality from its ancestor extending it with functionality typical from Bank in Eternity Service.
methods

Methods managing access certificates

virtual MsgField* DecryptByACPriv(const ACID acid, const MsgField *dData)
Decrypting data from Service

virtual Err SwitchDataReceivedCommand(const Char *command, const MsgField *dataFld, const ACID acid)
Handle data_received command

Data_received commands handling methods

methods

Majordomo(Bank * parent, LogFile * majordomoLogFile)
Bank Majordomo constructor

virtual ACManager* GetPtrToACManager(Char *type)
Overriden method that returns pointer to ACManager of specified type

Err Initialize()
Some cool initialization

ESTime* GetTime()
Returns current time

MsgField* UnsealSAuth(const ACID acid, const MsgField *sealSA)
Decrypts S_AUTH

MsgField* Majordomo::ComputeMAC(MsgField *oAuth)
Computes MAC. Computes MAC from OAuths.
Returns:
MsgField computed MAC.
Parameters:
oAuth - oAuth to compute MAC.
Author:
Pavel
See Also:

Err Majordomo::CreateCipheredData()
Creates ciphered data. Modifies file for storage. Adds random string and encrypts with private key.
The result looks like this:
GM_PUBLIC_KEY:
GM_DATA: (encrypted with Private Key)
GM_RANDOM: (random string)
GM_FILE: (decrypted file)
Returns:
error code
Author:
pavel
See Also:
Cipherer, RandomGenerator

GMessage* Majordomo::CreateSimpleFileToStor(GMessage *certificate)
Creates simple message with a file for storage. Creates a message with file for storage, that is going to be sent to Eso as a CE_FILE_FOR_STOR including encryption of the file with TCBPubKey of the Eso.
Returns:
created messsage.
Parameters:
certificate - Certificate of the Eso with the TCBPubKey.
Author:
Pavel
See Also:
GMessage, Cipherer

GMessage* Majordomo::CreateSimpleReqForFile(GMessage *pubKey)
Creates REQ_FOR_FILE. Creates REQ_FRO_FILE message, that is to be sent to Esos.
Returns:
created GMessage
Parameters:
pubKey - PubKey for encrypting FFID.
Author:
Marek
See Also:
Cipherer

Err Majordomo::GenerateACID(ACID *acid)
Generates ID of certificate. Generates random string of the length of ACID.
Returns:
error code
Parameters:
acid - Generated acid.
Author:
Marek
See Also:
RandomGenerator

Err Majordomo::GenerateACKeys(ACID *acid, GMessage **acPubKey)
Generates certificate key pair. Generates new access certificate key pair.
Returns:
error code
Parameters:
acid - Generated ID of newly generated access certificate
acPubKey - Public key of generated key pair
Author:
Marek
See Also:
Bank, SixMajordomo, Cipherer

Err Majordomo::GenerateAsymetricKey()
Generates public and private keys.. Calls the cipherer's method to generate public and private keys. Saves them in files.
Returns:
error code
Author:
Marek
See Also:
Cipherer

Err Majordomo::GenerateThisSixAC(MsgField *onion, GMessage **generatedAC)
Generates this Six AC. This Six AC is generated every time Client wants to communicate. New tuple of keys is generated and saved.
Returns:
error code
Parameters:
onion - Onion to include to AC.
generatedAC - AC that was generated.
Author:
Marek
See Also:
SixMajordomo

Err Majordomo::SwitchDataReceivedCommand(const Char *command, const MsgField *dataFld, const ACID acid)
Switches data_received command. Overrides and calls SixMajordomo::SwitchDataReceivedCommand and chooses a method to handle the command from the incomming message.
Returns:
error code
Parameters:
command - one of data_received commands, comming from the world
dataFld - data field comming along with command
acid - ID of this Eso access certificate which was used as delivery address
Author:
Pavel
See Also:
SixMajordomo

Err Majordomo::SwitchDataReceivedCommand(const Char *command, const MsgField *dataFld, const ACID acid)
Chooses a method to handle the command with. According to the received command chooses a method to handle the command with.
Returns:
error code
Parameters:
command - Command in the incoming message.
dataFld - Data in the incoming message.
acid - ID of the certificate to which the data was sent.
Author:
Marek
See Also:

Err Majordomo::SwitchMixCommand(MsgField *commandFld, MsgField *dataFld)
Chooses serving method for Mix command. According to field Command (in message poped from outMsgQueue) choose handling method.
Returns:
error code
Parameters:
commandFld - command from Mix
dataFld - data comming along with command
Author:
Marek
See Also:
SixMajordomo::SwitchMixCommand()

MsgField* Majordomo::UnsealSAuth(const ACID myACID, const MsgField *sealSA)
Unseals sAuth. Given seald sAuth returns unsealed one using DecryptByACPriv.
Returns:
error code
Parameters:
myACID - ID of access certificate which public key was used to seal sAuth
sealSA - Sealed sAuth
Author:
Marek
See Also:
DecryptByACPriv()


This class has no child classes.
Author:
jmeno
See Also:
co_se_toho_tyka

alphabetic index hierarchy of classes


generated by doc++