Back to index

nordugrid-arc-nox  1.1.0~rc6
PayloadTLSMCC.h
Go to the documentation of this file.
00001 #ifndef __ARC_PAYLOADTLSMCC_H__
00002 #define __ARC_PAYLOADTLSMCC_H__
00003 
00004 #include <vector>
00005 #include <openssl/ssl.h>
00006 
00007 #include <arc/message/PayloadStream.h>
00008 #include <arc/message/MCC.h>
00009 #include <arc/Logger.h>
00010 
00011 #include "BIOMCC.h"
00012 #include "PayloadTLSStream.h"
00013 #include "ConfigTLSMCC.h"
00014 
00015 namespace Arc {
00016 
00017 // This class extends PayloadTLSStream with initialization procedure to 
00018 // connect it to next MCC or Stream interface.
00019 class PayloadTLSMCC: public PayloadTLSStream {
00020  private:
00022   bool master_;
00024   SSL_CTX* sslctx_;
00025   static int ex_data_index_;
00026   //PayloadTLSMCC(PayloadTLSMCC& stream);
00027   ConfigTLSMCC config_;
00028   bool StoreInstance(void);
00029   // Generic purpose bit flags
00030   unsigned long flags_;
00031  public:
00035   PayloadTLSMCC(MCCInterface* mcc, const ConfigTLSMCC& cfg, Logger& logger);
00039   PayloadTLSMCC(PayloadStreamInterface* stream, const ConfigTLSMCC& cfg, Logger& logger);
00043   PayloadTLSMCC(PayloadTLSMCC& stream);
00044   virtual ~PayloadTLSMCC(void);
00045   const ConfigTLSMCC& Config(void) { return config_; };
00046   static PayloadTLSMCC* RetrieveInstance(X509_STORE_CTX* container);
00047   unsigned long Flags(void) { return flags_; };
00048   void Flags(unsigned long flags) { flags=flags_; };
00049 };
00050 
00051 } // namespace Arc 
00052 
00053 #endif /* __ARC_PAYLOADTLSMCC_H__ */
00054