Rudiments

- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
gsscredentials Class Reference

## Public Member Functions
| gsscredentials ()
| ~gsscredentials ()
bool | setKeytab (const char *keytab)
const char * | getKeytab ()
void | setDesiredLifetime (uint32_t desiredlifetime)
uint32_t | getDesiredLifetime ()
void | addDesiredMechanism (gssmechanism *mech)
void | removeDesiredMechanism (gssmechanism *mech)
bool | inDesiredMechanisms (gssmechanism *mech)
void | clearDesiredMechanisms ()
uint64_t | getDesiredMechanismCount ()
gssmechanism * | getDesiredMechanism (uint64_t index)
bool | acquireForService (const char *name)
bool | acquireForUser (const char *name)
bool | acquired ()
void | close ()
const char * | getName ()
uint32_t | getActualLifetime ()
bool | inActualMechanisms (gssmechanism *mech)
uint64_t | getActualMechanismCount ()
gssmechanism * | getActualMechanism (uint64_t index)
uint32_t | getMajorStatus ()
uint32_t | getMinorStatus ()
const char * | getStatus ()
const char * | getGSSMajorStatus ()
const char * | getGSSMinorStatus ()
const char * | getMechanismMajorStatus ()
const char * | getMechanismMinorStatus ()
const void * | getCredentials ()

## Constructor & Destructor Documentation

gsscredentials::gsscredentials | ( |  | ) |

Creates an instance of the gsscredentials class.

gsscredentials::~gsscredentials | ( |  | ) |

Deletes this instance of the gsscredentials class.

## Member Function Documentation

bool gsscredentials::acquired | ( |  | ) |

Returns true if credentials are currently acquired and false otherwise.

bool gsscredentials::acquireForService | ( | const char * | name | ) |

Acquires credentials for service principal "name". Returns true on success and false on failure.

bool gsscredentials::acquireForUser | ( | const char * | name | ) |

Acquires credentials for user principal "name". Returns true on success and false on failure.

void gsscredentials::addDesiredMechanism | ( | gssmechanism * | mech | ) |

Adds security mechanism "mech" to the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods.

void gsscredentials::clearDesiredMechanisms | ( |  | ) |

Removes all security mechanism from the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods.

void gsscredentials::close | ( |  | ) |

Releases any previously acquired credentials.

uint32_t gsscredentials::getActualLifetime | ( |  | ) |

Returns the actual lifetime of the credentials, assigned during the most recent call to an aquire method. Returns the largest unsigned 32-bit integer (indicating an indefinite lifetime, the default) if no call to an acquire method has been made, or if close() has been called.

gssmechanism* gsscredentials::getActualMechanism | ( | uint64_t | index | ) |

Returns the "index"'th security mechanism from the list of security mechanisms that were actually used during the most recent call to one of the acquire methods or NULL if no call to an acquire method has been made, or if close() has been called.

uint64_t gsscredentials::getActualMechanismCount | ( |  | ) |

Returns the number of security mechanisms in the list of security mechanisms that were actually used during the most recent call to one of the acquire methods or 0 if no call to an acquire method has been made, or if close() has been called.

const void* gsscredentials::getCredentials | ( |  | ) |

Returns a platform-specific binary internal representation of the credentials, or NULL if no call has been made to an acquire method, or if close() has been called.

uint32_t gsscredentials::getDesiredLifetime | ( |  | ) |

Returns the desired credentials-lifetime set by a previous call to setDesiredLifetime() or the largest 32-bit integer (indicating an indefinite lifetime, the default) if no desired credentials-lifetime has been set.

gssmechanism* gsscredentials::getDesiredMechanism | ( | uint64_t | index | ) |

Returns the "index"'th security mechanism from the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods.

uint64_t gsscredentials::getDesiredMechanismCount | ( |  | ) |

Returns the number of security mechanisms in the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods.

const char* gsscredentials::getGSSMajorStatus | ( |  | ) |

Returns the GSS major status string of the most recently failed call.

const char* gsscredentials::getGSSMinorStatus | ( |  | ) |

Returns the GSS minor status string of the most recently failed call.

const char* gsscredentials::getKeytab | ( |  | ) |

Returns the location of the keytab that will be used when acquiring credentials.

uint32_t gsscredentials::getMajorStatus | ( |  | ) |

Returns the major-status code of the most recently failed call.

const char* gsscredentials::getMechanismMajorStatus | ( |  | ) |

Returns the mechanism major status string of the most recently failed call.

const char* gsscredentials::getMechanismMinorStatus | ( |  | ) |

Returns the mechanism minor status string of the most recently failed call.

uint32_t gsscredentials::getMinorStatus | ( |  | ) |

Returns the minor-status code of the most recently failed call.

const char* gsscredentials::getName | ( |  | ) |

Returns the name for which credentials were requested in the most recent call to acquire, if the name was provided as a string. Returns NULL if no call to an acquire method has been made, or if close() has been called.

const char* gsscredentials::getStatus | ( |  | ) |

Returns the status string of the most recently failed call.

bool gsscredentials::inActualMechanisms | ( | gssmechanism * | mech | ) |

Returns true if security mechanism "mech" is in the list of security mechanisms that was actually used during the most recent call to one of the acquire methods and false otherwise.

bool gsscredentials::inDesiredMechanisms | ( | gssmechanism * | mech | ) |

Returns true if security mechanism "mech" is in the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods and false otherwise.

void gsscredentials::removeDesiredMechanism | ( | gssmechanism * | mech | ) |

Removes security mechanism "mech" from the list of security mechanisms that will be requested during a subsequent call to one of the acquire methods.

void gsscredentials::setDesiredLifetime | ( | uint32_t | desiredlifetime | ) |

Sets the credentials-lifetime that will be requested during subsequent calls to the acquire methods. Setting "desiredlifetime" to the largest 32-bit unsigned integer requests an indefinite lifetime.

bool gsscredentials::setKeytab | ( | const char * | keytab | ) |

Sets the location of the keytab to use when acquiring credentials.