gss.h
// Copyright (c) 1999-2018 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_GSS_H
#define RUDIMENTS_GSS_H
#include <rudiments/private/gssincludes.h>
class RUDIMENTS_DLLSPEC gss {
public:
gss();
~gss();
const char * const *getAvailableMechanisms();
static bool supported();
#include <rudiments/private/gss.h>
};
class RUDIMENTS_DLLSPEC gssmechanism {
public:
gssmechanism();
~gssmechanism();
bool initialize(const char *str);
bool initialize(const void *oid);
void clear();
const char *getString();
const void *getObjectId();
#include <rudiments/private/gssmechanism.h>
};
class RUDIMENTS_DLLSPEC gsscredentials {
public:
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();
#include <rudiments/private/gsscredentials.h>
};
class RUDIMENTS_DLLSPEC gsscontext : public securitycontext {
public:
gsscontext();
virtual ~gsscontext();
void setCredentials(gsscredentials *credentials);
gsscredentials *getCredentials();
void setFileDescriptor(filedescriptor *fd);
filedescriptor *getFileDescriptor();
void setDesiredLifetime(uint32_t desiredlifetime);
uint32_t getDesiredLifetime();
void setDesiredMechanism(gssmechanism *desiredmechanism);
gssmechanism *getDesiredMechanism();
void setDesiredFlags(uint32_t desiredflags);
void setDesiredFlags(const char *desiredflags);
uint32_t getDesiredFlags();
void setService(const char *service);
const char *getService();
bool connect();
bool accept();
uint32_t getActualLifetime();
gssmechanism *getActualMechanism();
uint32_t getActualFlags();
uint32_t getRemainingLifetime();
const char *getInitiator();
const char *getAcceptor();
bool getIsInitiator();
bool getIsOpen();
bool wrap(const unsigned char *input,
size_t inputsize,
unsigned char **output,
size_t *outputsize);
bool wrap(const unsigned char *input,
size_t inputsize,
bool useencryption,
unsigned char **output,
size_t *outputsize,
bool *encryptionused);
bool unwrap(const unsigned char *input,
size_t inputsize,
unsigned char **output,
size_t *outputsize);
bool unwrap(const unsigned char *input,
size_t inputsize,
unsigned char **output,
size_t *outputsize,
bool *decryptionused);
bool getMic(const unsigned char *message,
size_t messagesize,
unsigned char **mic,
size_t *micsize);
bool verifyMic(const unsigned char *message,
size_t messagesize,
const unsigned char *mic,
size_t micsize);
ssize_t read(void *buf, ssize_t size);
ssize_t write(const void *buf, ssize_t size);
ssize_t pending();
bool close();
ssize_t getSizeMax();
uint32_t getMajorStatus();
uint32_t getMinorStatus();
const char *getStatus();
const char *getGSSMajorStatus();
const char *getGSSMinorStatus();
const char *getMechanismMajorStatus();
const char *getMechanismMinorStatus();
#include <rudiments/private/gsscontext.h>
};
#endif
filedescriptor
Definition: filedescriptor.h:13
gss
Definition: gss.h:9
gss::~gss
~gss()
gss::getAvailableMechanisms
const char *const * getAvailableMechanisms()
gss::gss
gss()
gss::supported
static bool supported()
gsscontext
Definition: gss.h:230
gsscontext::write
ssize_t write(const void *buf, ssize_t size)
gsscontext::getStatus
const char * getStatus()
gsscontext::getService
const char * getService()
gsscontext::verifyMic
bool verifyMic(const unsigned char *message, size_t messagesize, const unsigned char *mic, size_t micsize)
gsscontext::getDesiredMechanism
gssmechanism * getDesiredMechanism()
gsscontext::getIsOpen
bool getIsOpen()
gsscontext::setDesiredFlags
void setDesiredFlags(uint32_t desiredflags)
gsscontext::wrap
bool wrap(const unsigned char *input, size_t inputsize, unsigned char **output, size_t *outputsize)
gsscontext::getGSSMinorStatus
const char * getGSSMinorStatus()
gsscontext::pending
ssize_t pending()
gsscontext::close
bool close()
gsscontext::connect
bool connect()
gsscontext::getFileDescriptor
filedescriptor * getFileDescriptor()
gsscontext::setDesiredMechanism
void setDesiredMechanism(gssmechanism *desiredmechanism)
gsscontext::getDesiredLifetime
uint32_t getDesiredLifetime()
gsscontext::getActualFlags
uint32_t getActualFlags()
gsscontext::getCredentials
gsscredentials * getCredentials()
gsscontext::setService
void setService(const char *service)
gsscontext::getSizeMax
ssize_t getSizeMax()
gsscontext::getMic
bool getMic(const unsigned char *message, size_t messagesize, unsigned char **mic, size_t *micsize)
gsscontext::getIsInitiator
bool getIsInitiator()
gsscontext::unwrap
bool unwrap(const unsigned char *input, size_t inputsize, unsigned char **output, size_t *outputsize)
gsscontext::~gsscontext
virtual ~gsscontext()
gsscontext::accept
bool accept()
gsscontext::getGSSMajorStatus
const char * getGSSMajorStatus()
gsscontext::setCredentials
void setCredentials(gsscredentials *credentials)
gsscontext::read
ssize_t read(void *buf, ssize_t size)
gsscontext::unwrap
bool unwrap(const unsigned char *input, size_t inputsize, unsigned char **output, size_t *outputsize, bool *decryptionused)
gsscontext::getDesiredFlags
uint32_t getDesiredFlags()
gsscontext::getRemainingLifetime
uint32_t getRemainingLifetime()
gsscontext::getInitiator
const char * getInitiator()
gsscontext::getMechanismMinorStatus
const char * getMechanismMinorStatus()
gsscontext::setDesiredLifetime
void setDesiredLifetime(uint32_t desiredlifetime)
gsscontext::getMechanismMajorStatus
const char * getMechanismMajorStatus()
gsscontext::setFileDescriptor
void setFileDescriptor(filedescriptor *fd)
gsscontext::gsscontext
gsscontext()
gsscontext::setDesiredFlags
void setDesiredFlags(const char *desiredflags)
gsscontext::getMinorStatus
uint32_t getMinorStatus()
gsscontext::getActualLifetime
uint32_t getActualLifetime()
gsscontext::getAcceptor
const char * getAcceptor()
gsscontext::getMajorStatus
uint32_t getMajorStatus()
gsscontext::wrap
bool wrap(const unsigned char *input, size_t inputsize, bool useencryption, unsigned char **output, size_t *outputsize, bool *encryptionused)
gsscontext::getActualMechanism
gssmechanism * getActualMechanism()
gsscredentials
Definition: gss.h:80
gsscredentials::acquireForService
bool acquireForService(const char *name)
gsscredentials::acquired
bool acquired()
gsscredentials::getActualLifetime
uint32_t getActualLifetime()
gsscredentials::getMechanismMinorStatus
const char * getMechanismMinorStatus()
gsscredentials::inDesiredMechanisms
bool inDesiredMechanisms(gssmechanism *mech)
gsscredentials::getKeytab
const char * getKeytab()
gsscredentials::removeDesiredMechanism
void removeDesiredMechanism(gssmechanism *mech)
gsscredentials::getDesiredMechanismCount
uint64_t getDesiredMechanismCount()
gsscredentials::~gsscredentials
~gsscredentials()
gsscredentials::getGSSMajorStatus
const char * getGSSMajorStatus()
gsscredentials::clearDesiredMechanisms
void clearDesiredMechanisms()
gsscredentials::addDesiredMechanism
void addDesiredMechanism(gssmechanism *mech)
gsscredentials::getCredentials
const void * getCredentials()
gsscredentials::getDesiredMechanism
gssmechanism * getDesiredMechanism(uint64_t index)
gsscredentials::acquireForUser
bool acquireForUser(const char *name)
gsscredentials::setDesiredLifetime
void setDesiredLifetime(uint32_t desiredlifetime)
gsscredentials::getName
const char * getName()
gsscredentials::inActualMechanisms
bool inActualMechanisms(gssmechanism *mech)
gsscredentials::close
void close()
gsscredentials::getMechanismMajorStatus
const char * getMechanismMajorStatus()
gsscredentials::getGSSMinorStatus
const char * getGSSMinorStatus()
gsscredentials::getActualMechanism
gssmechanism * getActualMechanism(uint64_t index)
gsscredentials::getDesiredLifetime
uint32_t getDesiredLifetime()
gsscredentials::getMajorStatus
uint32_t getMajorStatus()
gsscredentials::gsscredentials
gsscredentials()
gsscredentials::setKeytab
bool setKeytab(const char *keytab)
gsscredentials::getActualMechanismCount
uint64_t getActualMechanismCount()
gsscredentials::getStatus
const char * getStatus()
gsscredentials::getMinorStatus
uint32_t getMinorStatus()
gssmechanism
Definition: gss.h:41
gssmechanism::gssmechanism
gssmechanism()
gssmechanism::~gssmechanism
~gssmechanism()
gssmechanism::initialize
bool initialize(const char *str)
gssmechanism::initialize
bool initialize(const void *oid)
gssmechanism::clear
void clear()
gssmechanism::getObjectId
const void * getObjectId()
gssmechanism::getString
const char * getString()
input
Definition: input.h:9
output
Definition: output.h:9
securitycontext
Definition: security.h:16