gss.h
// Copyright (c) 2015 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 supportsGSS();
#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 count);
ssize_t write(const void *buf, ssize_t count);
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
gsscontext
Definition: gss.h:230
gsscredentials
Definition: gss.h:80
filedescriptor
Definition: filedescriptor.h:14
securitycontext
Definition: security.h:16
gssmechanism
Definition: gss.h:41
gss
Definition: gss.h:9