vomsdata(3)

✨ vomsdata πŸ’… β€” the Library Functions Manual page, bestie edition (part 1)

okay so. this is vomsdata, straight outta the Library Functions Manual, and it's the whole C++ API for talking to VOMS β€” getting attribute certs, parsing them, ordering stuff, the works. it's long, it's a lot, but we're gonna get through it together and honestly? it's iconic. πŸ¦‹βœ¨


🌸 NAME 🌸

vomsdata


πŸ’– SYNOPSIS πŸ’–

#include <voms_api.h>

πŸŽ€ Public Member Functions

vomsdata (std::string voms_dir='', std::string cert_dir='')
bool LoadSystemContacts (std::string dir='')
bool LoadUserContacts (std::string dir='')
std::vector< contactdata > FindByAlias (std::string alias)
std::vector< contactdata > FindByVO (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 Contact (std::string hostname, int port, std::string servsubject,
    std::string command, int timeout)
bool ContactRaw (std::string hostname, int port, std::string
    servsubject, std::string command, std::string &raw, int &version)
bool ContactRaw (std::string hostname, int port, std::string
    servsubject, std::string command, std::string &raw, int &version,
    int timeout)
void SetVerificationType (verify_type how)
void SetLifetime (int lifetime)
bool Import (std::string buffer)
bool Export (std::string &data)
bool DefaultData (voms &)
std::string ErrorMessage (void)
bool RetrieveFromCtx (gss_ctx_id_t context, recurse_type how)
bool RetrieveFromCred (gss_cred_id_t credential, recurse_type how)
bool Retrieve (X509_EXTENSION *ext)
bool RetrieveFromProxy (recurse_type how)
bool Retrieve (FILE *file, recurse_type how)
bool Retrieve (AC *ac)
~vomsdata ()
vomsdata (const vomsdata &)
void SetRetryCount (int retryCount)
void SetVerificationTime (time_t)
bool LoadCredentials (X509 *, EVP_PKEY *, STACK_OF(X509) *)
bool ContactRESTRaw (const std::string &, int, const std::string &,
    std::string &, int, int)

🌟 Static Public Member Functions

static void SkipSslInitialization ()

πŸ“¦ Data Fields

verror_type error
std::vector< voms > data
std::string workvo
std::string extra_data

πŸ¦‹ Detailed Description πŸ¦‹

Definition at line 193 of file voms_api.h.


πŸŽ€ Constructor & Destructor Documentation πŸŽ€

vomsdata::vomsdata (std::string voms_dir = '', std::string cert_dir = '')

Parameters

  • voms_dir β€” the directory that holds the certificate of the VOMS server πŸ—‚οΈ
  • cert_dir β€” the directory that holds the certificate of the CA πŸ—‚οΈ

If voms_dir is empty, the value of the environment variable X509_VOMS_DIR gets used instead. no cap.

If cert_dir is empty, the value of the environment variable X509_CERT_DIR gets used instead.

vomsdata::~vomsdata ()

the destructor. it just does its thing. πŸ’…

vomsdata::vomsdata (const vomsdata & )

copy constructor, purr. 🐱


πŸ”₯ Member Function Documentation πŸ”₯

void vomsdata::AddTarget (std::string target)

Adds a target to the AC.

  • 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's the equivalent of the voms_proxy_init command, but without the --include functionality. so close to the full thing, but not quite. πŸ™ˆ

  • 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 β€” the command sent to the server

Returns failure (F) or success (T)

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

Contacts a VOMS server to get a certificate.

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

  • 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 β€” the command sent to the server
  • timeout β€” Timeout for server connections in seconds

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, except it does not kick off the verification process, and the message received from the server is not parsed. so you get the raw vibes, unedited. 😌

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 β€” the command sent to the server
  • raw β€” OUTPUT PARAMETER, the answer from the server
  • version β€” OUTPUT PARAMETER, the version of the answer

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, int timeout)

Same as Contact, except it does not start the verification process, and the message received from the server is not parsed.

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 β€” the command sent to the server
  • raw β€” OUTPUT PARAMETER, the answer from the server
  • version β€” OUTPUT PARAMETER, the version of the answer
  • timeout β€” Timeout for server connections in seconds

Returns failure (F) or success (T)

bool vomsdata::ContactRESTRaw (const std::string & , int , const std::string & , std::string & , int , int )

that's it, that's the whole entry. no description given, bestie. πŸ’€

bool vomsdata::DefaultData (voms & )

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

std::string vomsdata::ErrorMessage (void )

Gets a textual description of the error.

Returns A string containing the error message.

bool vomsdata::Export (std::string & data)

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

⚠️ heads up: the function doesn't verify the data. so like, it's not checking your work for you, it's just packing it up. 😭

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. so don't come for me about ordering, it's giving chaos. πŸŒͺ️

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. (yes, opposite energy from Export, we love a plot twist ✨)

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::LoadCredentials (X509 * , EVP_PKEY * , STACK_OF(X509) * )

no description on this one, it's just sitting there looking mysterious. 🫢

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, it 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, it defaults to $VOMS_USERCONF. If that is empty too, it defaults to $HOME/.edg/vomses, or to ~/.edg/vomses as a last resort. it's giving backup plan energy. πŸ’œ

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 come back in the same order as the calls to this function.

  • att β€” The attribute to be ordered.

void vomsdata::ResetOrder (void )

Resets the ordering. undo, undo. ↩️

void vomsdata::ResetTargets (void )

Resets the target list. also undo. ↩️

bool vomsdata::Retrieve (AC * ac)

Gets VOMS information from the AC.

Parameters

  • ac β€” The extension to parse.

Returns failure (F) or success (T)

bool vomsdata::Retrieve (FILE * file, recurse_type how)

Gets VOMS information from a proxy saved as a file.

Parameters

  • file β€” the file name
  • how β€” Recursion type

Returns failure (F) or success (T)

⚠️ Note: it does NOT verify that the proxy is valid. such verification must be obtained through other means. so like, do your own vibe check on this one, fr fr.

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)

bool vomsdata::Retrieve (X509_EXTENSION * ext)

Gets VOMS information from the given extension.

Parameters

  • ext β€” The extension to parse.

Returns failure (F) or success (T)

bool vomsdata::RetrieveFromCred (gss_cred_id_t credential, recurse_type how)

Gets VOMS information from the given globus credential.

Parameters

  • credential β€” The credential from which to retrieve the certificate.
  • how β€” Recursion type

Returns failure (F) or success (T)

bool vomsdata::RetrieveFromCtx (gss_ctx_id_t context, recurse_type how)

Gets VOMS information from the given globus context.

Parameters

  • context β€” The context from which to retrieve the certificate.
  • how β€” Recursion type

Returns failure (F) or success (T)

bool vomsdata::RetrieveFromProxy (recurse_type how)

Gets VOMS information from an existing globus proxy.

Parameters

  • how β€” Recursion type

Returns failure (F) or success (T)

std::string vomsdata::ServerErrors (void )

Gets the error message returned by the server. so when the server is being dramatic, this is where you find out why. πŸ’…

void vomsdata::SetLifetime (int lifetime)

Set requested lifetime for the Contact() call.

Parameters

  • lifetime β€” Requested lifetime, in seconds

void vomsdata::SetRetryCount (int retryCount)

no description provided, it's just out here setting a retry count. keep it moving. πŸ”

void vomsdata::SetVerificationTime (time_t )

also no description. mysterious. πŸ•΅οΈ

void vomsdata::SetVerificationType (verify_type how)

Sets the type of verification done on the data.

Parameters

  • how β€” The type of verification.

void vomsdata::SkipSslInitialization () [static]

static, no description. it's the quiet one in the group chat. 🀫

✨ Field Documentation ✨

okay bestie, this is where we meet the actual fields β€” the lil data slots inside vomsdata. every single one is here, no skips, no cap. πŸ’…

πŸ’– std::vector<voms> vomsdata::data πŸ’–

This is literally the user's info, exactly like it appears in the certificate extension. It may contain data gathered from more than one VOMS server, so yeah, it can be a whole group chat of servers, not just one. 🫢

Definition at line 371 of file voms_api.h.

🌸 verror_type vomsdata::error 🌸

Error code. That's it, that's the vibe. If something goes wrong, this is where the tea is. 😭

Definition at line 212 of file voms_api.h.

πŸ¦‹ std::string vomsdata::extra_data πŸ¦‹

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

Heads up bestie: this field does not contain the result of a request to the VOMS server. It's instead data specified by the user. So don't get it twisted. πŸ™ˆ

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. iconic behavior, honestly. ✨

Definition at line 375 of file voms_api.h.

πŸŽ€ std::string vomsdata::workvo πŸŽ€

The value of the -vo option of the voms-proxy-init command. periodt. πŸ’…

Definition at line 374 of file voms_api.h.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for VOMS CC API from the source code. slay, Doxygen, you ate. πŸ’–


And that's the whole page, bestie! According to the footer, this comes from VOMS CC API, Version 1.5.0, and it's vomsdata(3). no date on this one, but the version is right there. stay iconic, and remember: always read the field docs. πŸ¦‹βœ¨

πŸ“¦ where this page comes from