#ifndef __KCLIENTCOMPAT__
#define __KCLIENTCOMPAT__
#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
# include <TargetConditionals.h>
# if TARGET_RT_MAC_CFM
# error "Use KfM 4.0 SDK headers for CFM compilation."
# endif
#endif
#if TARGET_OS_MAC
# include <Kerberos/krb.h>
# include <Kerberos/KClientTypes.h>
#else
# include <kerberosIV/krb.h>
# include <KClientTypes.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if TARGET_OS_MAC
# if defined(__MWERKS__)
# pragma import on
# endif
# pragma options align=mac68k
#endif
enum {
cKrbMapDoesntExist = -1020,
cKrbSessDoesntExist = -1019,
cKrbCredsDontExist = -1018,
cKrbUserCancelled = -1016,
cKrbConfigurationErr = -1015,
cKrbServerRejected = -1014,
cKrbServerImposter = -1013,
cKrbServerRespIncomplete = -1012,
cKrbNotLoggedIn = -1011,
cKrbAppInBkgnd = -1008,
cKrbInvalidSession = -1007,
cKrbKerberosErrBlock = -20000
};
typedef KClientSession KClientSessionInfo;
enum {
KClientLoggedIn,
KClientNotLoggedIn
};
OSErr KClientVersionCompat (
SInt16* outMajorVersion,
SInt16* outMinorVersion,
char* outVersionString);
OSErr KClientNewSessionCompat (
KClientSessionInfo* inSession,
UInt32 inLocalAddress,
UInt16 inLocalPort,
UInt32 inRemoteAddress,
UInt16 inRemotePort);
OSErr KClientDisposeSessionCompat (
KClientSessionInfo* inSession);
OSErr KClientGetTicketForServiceCompat (
KClientSessionInfo* inSession,
char* inService,
void* inBuffer,
UInt32* outBufferLength);
OSErr KClientGetTicketForServiceWithChecksumCompat (
KClientSessionInfo* inSession,
UInt32 inChecksum,
char* inService,
void* inBuffer,
UInt32* outBufferLength);
OSErr KClientLoginCompat (
KClientSessionInfo* inSession,
KClientKey* outPrivateKey);
OSErr KClientPasswordLoginCompat (
KClientSessionInfo* inSession,
char* inPassword,
KClientKey* outPrivateKey);
OSErr KClientLogoutCompat (void);
SInt16 KClientStatusCompat (void);
OSErr KClientGetSessionKeyCompat (
KClientSessionInfo* inSession,
KClientKey* outSessionKey);
OSErr KClientEncryptCompat (
KClientSessionInfo* inSession,
void* inPlainBuffer,
UInt32 inPlainBufferLength,
void* outEncryptedBuffer,
UInt32* ioEncryptedBufferLength);
OSErr KClientDecryptCompat (
KClientSessionInfo* inSession,
void* inEncryptedBuffer,
UInt32 inEncryptedBufferLength,
UInt32* outPlainBufferOffset,
UInt32* outPlainBufferLength);
OSErr KClientProtectIntegrityCompat (
KClientSessionInfo* inSession,
void* inPlainBuffer,
UInt32 inPlainBufferLength,
void* outProtectedBuffer,
UInt32* ioProtectedBufferLength);
OSErr KClientVerifyIntegrityCompat (
KClientSessionInfo* inSession,
void* inProtectedBuffer,
UInt32 inProtectedBufferLength,
UInt32* outPlainBufferOffset,
UInt32* outPlainBufferLength);
OSErr KServerNewSessionCompat (
KClientSessionInfo* inSession,
char* inService,
UInt32 inLocalAddress,
UInt16 inLocalPort,
UInt32 inRemoteAddress,
UInt16 inRemotePort);
OSErr KServerVerifyTicketCompat (
KClientSessionInfo* inSession,
void* inBuffer,
char* inFilename);
OSErr KServerGetReplyTicketCompat (
KClientSessionInfo* inSession,
void* outBuffer,
UInt32* ioBufferLength);
OSErr KServerAddKeyCompat (
KClientSessionInfo* inSession,
KClientKey* inPrivateKey,
char* inService,
SInt32 inVersion,
char* inFilename);
OSErr KServerGetKeyCompat (
KClientSessionInfo* inSession,
KClientKey* outPrivateKey,
char* inService,
SInt32 inVersion,
char* inFilename);
OSErr KServerGetSessionTimeRemainingCompat (
KClientSessionInfo* inSession,
SInt32* outSeconds);
OSErr KClientGetSessionUserNameCompat (
KClientSessionInfo* inSession,
char* outUserName,
SInt16 inNameType);
OSErr KClientMakeSendAuthCompat (
KClientSessionInfo* inSession,
char* inService,
void* outBuffer,
UInt32* ioBufferLength,
SInt32 inChecksum,
char* inApplicationVersion);
OSErr KClientVerifyReplyTicketCompat (
KClientSessionInfo* inSession,
void* inBuffer,
UInt32* ioBufferLength);
OSErr KClientVerifyUnencryptedReplyTicketCompat (
KClientSessionInfo* inSession,
void* inBuffer,
UInt32* ioBufferLength);
#if TARGET_OS_MAC
# if defined(__MWERKS__)
# pragma import reset
# endif
# pragma options align=reset
#endif
#ifdef __cplusplus
}
#endif
#endif