XrdSecProtocol Class Reference
#include <XrdSecInterface.hh>
List of all members.
Public Member Functions |
| virtual int | Authenticate (XrdSecCredentials *cred, XrdSecParameters **parms, XrdOucErrInfo *einfo=0)=0 |
| virtual XrdSecCredentials * | getCredentials (XrdSecParameters *parm=0, XrdOucErrInfo *einfo=0)=0 |
| virtual int | Encrypt (const char *, int, XrdSecBuffer **) |
| virtual int | Decrypt (const char *, int, XrdSecBuffer **) |
| virtual int | Sign (const char *, int, XrdSecBuffer **) |
| virtual int | Verify (const char *, int, const char *, int) |
| virtual int | getKey (char *=0, int=0) |
| virtual int | setKey (char *, int) |
| virtual void | Delete ()=0 |
| | Delete the protocol object. DO NOT use C++ delete() on this object.
|
| | XrdSecProtocol (const char *pName) |
| | Constructor.
|
Public Attributes |
| XrdSecEntity | Entity |
Protected Member Functions |
| virtual | ~XrdSecProtocol () |
| | Destructor (prevents use of direct delete).
|
Constructor & Destructor Documentation
| XrdSecProtocol::XrdSecProtocol |
( |
const char * |
pName |
) |
[inline] |
| virtual XrdSecProtocol::~XrdSecProtocol |
( |
|
) |
[inline, protected, virtual] |
Destructor (prevents use of direct delete).
Member Function Documentation
Authenticate a client.
- Parameters:
-
| cred | Credentials supplied by the client. |
| parms | Place where the address of additional authentication data is to be placed for another autrhentication handshake. |
| einfo | The error information object where error messages should be placed. The messages are returned to the client. Should einfo be null, messages should be written to stderr. |
- Returns:
- > 0 -> parms present (more authentication needed) = 0 -> Entity present (authentication suceeded) < 0 -> einfo present (error has occured)
| virtual int XrdSecProtocol::Decrypt |
( |
const char * |
, |
|
|
int |
, |
|
|
XrdSecBuffer ** |
| |
|
) |
| | [inline, virtual] |
Decrypt data in inbuff using the session key.
- Parameters:
-
| inbuff | buffer holding data to be decrypted. |
| inlen | length of the data. |
| outbuff | place where a pointer to the decrypted data is placed. |
- Returns:
- < 0 Failed,the return value is -errno (see Encrypt). = 0 Success, outbuff contains a pointer to the decrypted data. The caller is responsible for deleting the returned object.
| virtual void XrdSecProtocol::Delete |
( |
|
) |
[pure virtual] |
Delete the protocol object. DO NOT use C++ delete() on this object.
| virtual int XrdSecProtocol::Encrypt |
( |
const char * |
, |
|
|
int |
, |
|
|
XrdSecBuffer ** |
| |
|
) |
| | [inline, virtual] |
Encrypt data in inbuff using the session key.
- Parameters:
-
| inbuff | buffer holding data to be encrypted. |
| inlen | length of the data. |
| outbuff | place where a pointer to the encrypted data is placed. |
- Returns:
- < 0 Failed, the return value is -errno of the reason. Typically, -EINVAL - one or more arguments are invalid. -NOTSUP - encryption not supported by the protocol -ENOENT - Context not innitialized = 0 Success, outbuff contains a pointer to the encrypted data. The caller is responsible for deleting the returned object.
Generate client credentials to be used in the authentication process.
- Parameters:
-
| parm | Pointer to the information returned by the server either in the initial login response or the authmore response. |
| einfo | The error information object where error messages should be placed. The messages are returned to the client. Should einfo be null, messages should be written to stderr. |
- Returns:
- Success: Pointer to credentials to sent to the server. The caller is responsible for deleting the object. Failure: Null pointer with einfo, if supplied, containing the reason for the failure.
| virtual int XrdSecProtocol::getKey |
( |
char * |
= 0, |
|
|
int |
= 0 | |
|
) |
| | [inline, virtual] |
Get the current encryption key (i.e. session key)
- Parameters:
-
| buff | buffer to hold the key, and may be null. |
| size | size of the buffer. |
- Returns:
- < 0 Failed, returned value if -errno (see Encrypt) >= 0 The size of the encyption key. The supplied buffer of length size hold the key. If the buffer address is supplied, the key is placed in the buffer.
| virtual int XrdSecProtocol::setKey |
( |
char * |
, |
|
|
int |
| |
|
) |
| | [inline, virtual] |
Set the current encryption key
- Parameters:
-
| buff | buffer that holds the key. |
| size | size of the key. |
- Returns:
- : < 0 Failed, returned value if -errno (see Encrypt) = 0 The new key has been set.
| virtual int XrdSecProtocol::Sign |
( |
const char * |
, |
|
|
int |
, |
|
|
XrdSecBuffer ** |
| |
|
) |
| | [inline, virtual] |
Sign data in inbuff using the session key.
- Parameters:
-
| inbuff | buffer holding data to be signed. |
| inlen | length of the data. |
| outbuff | place where a pointer to the signature is placed. |
- Returns:
- < 0 Failed,the return value is -errno (see Encrypt). = 0 Success, outbuff contains a pointer to the signature. The caller is responsible for deleting the returned object.
| virtual int XrdSecProtocol::Verify |
( |
const char * |
, |
|
|
int |
, |
|
|
const char * |
, |
|
|
int |
| |
|
) |
| | [inline, virtual] |
Verify a signature using the session key.
- Parameters:
-
| inbuff | buffer holding data to be verified. |
| inlen | length of the data. |
| sigbuff | pointer to the signature data. |
| siglen | length of the signature data. |
- Returns:
- < 0 Failed,the return value is -errno (see Encrypt). = 0 Success, signature is correct. > 0 Failed to verify, signature does not match inbuff data.
Member Data Documentation
Structure holding the entity's identification. It is filled in by a successful call to Authenticate() (i.e. it returns 0).
The documentation for this class was generated from the following file: