xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdSecsss
XrdSecsssRR.hh
Go to the documentation of this file.
1
#ifndef __SecsssRR__
2
#define __SecsssRR__
3
/******************************************************************************/
4
/* */
5
/* X r d S e c s s s R R . h h */
6
/* */
7
/* (c) 2008 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC02-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// $Id$
14
15
#include <string.h>
16
#include <time.h>
17
18
// The following is the packet header and is always unencrypted.
19
//
20
struct
XrdSecsssRR_Hdr
21
{
22
char
ProtID
[4];
// Protocol ID ("sss")
23
char
Pad
[3];
// Padding bytes
24
char
EncType
;
// Encryption type as one of:
25
static
const
char
etBFish32
=
'0'
;
// Blowfish
26
27
long
long
KeyID
;
// Key ID for encryption
28
};
29
30
// The data portion of the packet is encrypted with the private shared key
31
// It immediately follows the header and has a maximum size (defined here).
32
//
33
struct
XrdSecsssRR_Data
34
{
35
char
Rand
[32];
// 256-bit random string (avoid text attacks)
36
int
GenTime
;
// Time data generated (time(0) - BaseTime)
37
char
Pad
[3];
// Reserved
38
char
Options
;
// One of the following:
39
static
const
char
UseData
= 0x00;
// Use the ID data as authenticated name
40
static
const
char
SndLID
= 0x01;
// Server to send login ID
41
42
static
const
int
DataSz
= 4040;
43
char
Data
[
DataSz
];
// Optional data, as follows:
44
45
// (<Flag><packed null terminated string>)+
46
//
47
static
const
char
theName
= 0x01;
48
static
const
char
theVorg
= 0x02;
49
static
const
char
theRole
= 0x03;
50
static
const
char
theGrps
= 0x04;
51
static
const
char
theEndo
= 0x05;
52
// theCert = 0x06; // Reserved for future use
53
static
const
char
theRand
= 0x07;
// Random string (ignored)
54
static
const
char
theLgid
= 0x10;
// from server only
55
static
const
char
theHost
= 0x20;
// from client only (required)
56
};
57
58
static
const
int
XrdSecsssRR_Data_HdrLen
=
sizeof
(
XrdSecsssRR_Data
) -
59
XrdSecsssRR_Data::DataSz
;
60
#endif
Generated by
1.8.1.2