XrdSecsssRR.hh

Go to the documentation of this file.
00001 #ifndef __SecsssRR__
00002 #define __SecsssRR__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                        X r d S e c s s s R R . h h                         */
00006 /*                                                                            */
00007 /* (c) 2008 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*                            All Rights Reserved                             */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012   
00013 //       $Id: XrdSecsssRR.hh 28902 2009-06-11 12:36:21Z ganis $
00014 
00015 #include <string.h>
00016 #include <time.h>
00017 
00018 // The following is the packet header and is always unencrypted.
00019 //
00020 struct XrdSecsssRR_Hdr
00021 {
00022 char      ProtID[4];                 // Protocol ID ("sss")
00023 char      Pad[3];                    // Padding bytes
00024 char      EncType;                   // Encryption type as one of:
00025 static const char etBFish32 = '0';   // Blowfish
00026 
00027 long long KeyID;                     // Key ID for encryption
00028 };
00029 
00030 // The data portion of the packet is encrypted with the private shared key
00031 // It immediately follows the header and has a maximum size (defined here).
00032 //
00033 struct XrdSecsssRR_Data
00034 {
00035 char      Rand[32];                  // 256-bit random string (avoid text attacks)
00036 int       GenTime;                   // Time data generated   (time(0) - BaseTime)
00037 char      Pad[3];                    // Reserved
00038 char      Options;                   // One of the following:
00039 static const char UseData= 0x00;     // Use the ID data  as authenticated name
00040 static const char SndLID = 0x01;     // Server to send login ID
00041 
00042 static const int  DataSz = 4040;
00043 char      Data[DataSz];              // Optional data, as follows:
00044 
00045 //           (<Flag><packed null terminated string>)+
00046 //
00047 static const char theName = 0x01;
00048 static const char theVorg = 0x02;
00049 static const char theRole = 0x03;
00050 static const char theGrps = 0x04;
00051 static const char theEndo = 0x05;
00052 //                theCert = 0x06; // Reserved for future use
00053 static const char theRand = 0x07; // Random string (ignored)
00054 static const char theLgid = 0x10; // from server only
00055 static const char theHost = 0x20; // from client only (required)
00056 };
00057 
00058 static const int  XrdSecsssRR_Data_HdrLen = sizeof(XrdSecsssRR_Data) -
00059                                             XrdSecsssRR_Data::DataSz;
00060 #endif

Generated on Tue Jul 5 14:47:02 2011 for ROOT_528-00b_version by  doxygen 1.5.1