#ifndef _CDSAuthParams_
#define _CDSAuthParams_ 1
#include <openssl/evp.h>
#include <PasswordServer/AuthFile.h>
#include <DirectoryService/DirServices.h>
#include <DirectoryService/DirServicesUtils.h>
#include <DirectoryService/DirServicesConst.h>
#include <DirectoryServiceCore/CDSAuthDefs.h>
#include <DirectoryServiceCore/chap.h>
#include <DirectoryServiceCore/digestmd5.h>
#include <DirectoryServiceCore/pps.h>
class CDSAuthParams
{
public:
CDSAuthParams();
virtual ~CDSAuthParams();
virtual void ZeroHashes( void );
virtual tDirStatus LoadParamsForAuthMethod(
tDataNodePtr inAuthMethod,
tDataBufferPtr inAuthData,
tDataBufferPtr inAuthStepData );
virtual void PostEvent( tDirStatus inAuthResult );
virtual CFMutableDictionaryRef DictionaryFromAuthItems( void );
virtual void SetParamsFromDictionary( CFDictionaryRef inKeyedAuthItems );
virtual tDirStatus ExtractServiceInfo( tDataBufferPtr inAuthStepData );
UInt32 uiAuthMethod;
char *mAuthMethodStr;
char *pUserName;
char *pNewPassword;
char *pOldPassword;
unsigned char *pNTLMDigest;
UInt32 ntlmDigestLen;
UInt32 ntlmHashType;
unsigned char *pCramResponse;
UInt32 cramResponseLen;
char *pSambaName;
char *pDomain;
char *pAdminUser;
char *pAdminPassword;
unsigned char P21[kHashShadowKeyLength];
unsigned char C8[kHashShadowChallengeLength];
unsigned char C16[16];
unsigned char *PeerC16;
unsigned char P24[kHashShadowResponseLength];
unsigned char P24Input[kHashShadowResponseLength];
unsigned char GeneratedNTLM[EVP_MAX_MD_SIZE];
char MSCHAP2Response[MS_AUTH_RESPONSE_LENGTH+1];
tDataListPtr dataList;
char *path;
unsigned char hashes[kHashTotalLength];
unsigned char generatedHashes[kHashTotalLength];
UInt32 hashLength;
SInt32 hashesLengthFromFile;
tDataNodePtr secureHashNode;
unsigned char secureHash[kHashSaltedSHA1Length];
unsigned int itemCount;
char *nativeAttrType;
char *policyStr;
struct timespec modDateOfPassword;
struct timeval modDateAssist;
PWGlobalAccessFeatures globalAccess;
PWGlobalMoreAccessFeatures globalMoreAccess;
UInt32 policyStrLen;
digest_context_t digestContext;
int keySize;
char *challenge;
char *apopResponse;
char *aaData;
char *aaDataLocalCacheUser;
CFDictionaryRef serviceInfoDict;
bool mPostAuthEvent;
protected:
private:
};
#endif