Main Page   Compound List   File List   Compound Members   File Members  

vomsdata Struct Reference

#include <voms_api.h>

List of all members.

Public Methods

 vomsdata (std::string voms_dir="", std::string cert_dir="")
bool LoadSystemContacts (std::string dir="")
bool LoadUserContacts (std::string dir="")
std::vector< contactdataFindByAlias (std::string alias)
std::vector< contactdataFindByVO (std::string vo)
void Order (std::string att)
void ResetOrder (void)
void AddTarget (std::string target)
std::vector< std::string > ListTargets (void)
void ResetTargets (void)
std::string ServerErrors (void)
bool Retrieve (X509 *cert, STACK_OF(X509)*chain, recurse_type how=RECURSE_CHAIN)
bool Contact (std::string hostname, int port, std::string servsubject, std::string command)
bool ContactRaw (std::string hostname, int port, std::string servsubject, std::string command, std::string &raw, int &version)
void SetVerificationType (verify_type how)
void SetLifetime (int lifetime)
bool Import (std::string buffer)
bool Export (std::string &data)
bool DefaultData (voms &)

Public Attributes

verror_type error
std::vector< vomsdata
std::string workvo
std::string extra_data


Constructor & Destructor Documentation

vomsdata::vomsdata std::string    voms_dir = "",
std::string    cert_dir = ""
 

Parameters:
voms_dir  The directory which contains the certificate of the VOMS server
cert_dir  The directory which contains the certificate of the CA
If voms_dir is empty, the value of the environment variable X509_VOMS_DIR is taken.

If cert_dir is empty, the value of the environment variable X509_CERT_DIR is taken.


Member Function Documentation

void vomsdata::AddTarget std::string    target
 

Adds a target to the AC.

Parameters:
target  The target to be added. it should be a FQDN.

bool vomsdata::Contact std::string    hostname,
int    port,
std::string    servsubject,
std::string    command
 

Contacts a VOMS server to get a certificate

It is the equivalent of the voms_proxy_init command, but without the --include functionality.

Parameters:
hostname  FQDN of the VOMS server
port  the port on which the VOMS server is listening
servsubject  the subject of the server's certificate
command  Command
Returns:
failure (F) or success (T)

bool vomsdata::ContactRaw std::string    hostname,
int    port,
std::string    servsubject,
std::string    command,
std::string &    raw,
int &    version
 

Same as Contact, however it does not start the verification process, and the

Parameters:
raw  and ion parameters contain the message sent from the server along with the version number of the result

bool vomsdata::DefaultData voms  
 

Get the default data extension from those present in the pseudo certificate

bool vomsdata::Export std::string &    data
 

Exports data from vomsdata::data to the format used for inclusion into a certificate.

The function doesn't verify the data

Parameters:
data  The certificate extension
Returns:
Failure (F) or Success (T)

std::vector<contactdata> vomsdata::FindByAlias std::string    alias
 

Finds servers which share a common alias.

Parameters:
alias  The alias to look for.
Returns:
The servers found. The order in which they are returned is unspecified.

std::vector<contactdata> vomsdata::FindByVO std::string    vo
 

Finds servers which serve a common VO

Parameters:
vo  The VO name to look for.
Returns:
The servers found. The order in which they are returned is unspecified.

bool vomsdata::Import std::string    buffer
 

Converts data from the format used for inclusion into a certificate to the internal format

The function does verify the data.

Parameters:
buffer  contains the data to be converted
Returns:
Failure (F) or Success (T)

std::vector<std::string> vomsdata::ListTargets void   
 

Returns the list of targets.

bool vomsdata::LoadSystemContacts std::string    dir = ""
 

Loads the system wide configuration files.

Parameters:
dir  The directory in which the files are stored.
If dir is empty, defaults to /opt/edg/etc/vomses.

Returns:
True if all went OK, false otherwise.

bool vomsdata::LoadUserContacts std::string    dir = ""
 

Loads the user-specific configuration files.

Parameters:
dir  The directory in which the files are stored.
If dir is empty, defaults to $VOMS_USERCONF. If this is empty too, defaults to $HOME/.edg/vomses, or to ~/.edg/vomses as a last resort.

Returns:
True if all went OK, false otherwise.

void vomsdata::Order std::string    att
 

Sets up the ordering of the results.

Defines the ordering of the data returned by Contact(). Results are ordered in the same order as the calls to this function.

Parameters:
att  The attribute to be ordered.

void vomsdata::ResetOrder void   
 

Resets the ordering.

void vomsdata::ResetTargets void   
 

Resets the target list.

bool vomsdata::Retrieve X509 *    cert,
STACK_OF(X509)*    chain,
recurse_type    how = RECURSE_CHAIN
 

Extracts the VOMS extension from an X.509 certificate. The function doesn't check the validity of the certificates, but it does check the content of the user data.

Parameters:
cert  The certificate with the VOMS extensions
chain  The chain of the validation certificates (only the intermediate ones)
how  Recursion type
Returns:
failure (F) or success (T)

std::string vomsdata::ServerErrors void   
 

Gets the error message returned by the server

void vomsdata::SetLifetime int    lifetime
 

Set requested lifetime for the Contact() call.

Parameters:
lifetime  Requested lifetime, in seconds

void vomsdata::SetVerificationType verify_type    how
 

Sets the type of verification done on the data.

Parameters:
how  The type of verification.


Member Data Documentation

std::vector<voms> vomsdata::data
 

User's info, as in the certificate extension. It may contain data gathered from more than one VOMS server,

Definition at line 276 of file voms_api.h.

verror_type vomsdata::error
 

Error code

Definition at line 152 of file voms_api.h.

std::string vomsdata::extra_data
 

The data specified by the user with the --include switch.

Note that this field doesn't contain the result of a request to the VOMS server, but instead data specified by the user.

The reason for the introduction of this extension is to let a user include important data into his proxy certificate, like, for example, a kerberos ticket

Definition at line 280 of file voms_api.h.

std::string vomsdata::workvo
 

The value of the -vo option of the voms-proxy-init command

Definition at line 279 of file voms_api.h.


The documentation for this struct was generated from the following file:
Generated on Thu Jan 29 11:37:19 2004 for VOMS CC API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002