91 lines
2.0 KiB
C
91 lines
2.0 KiB
C
|
#ifndef _MICASA_KEYS_H_
|
||
|
#define _MICASA_KEYS_H_
|
||
|
|
||
|
#include "IMiCASAKeys.h"
|
||
|
#include <micasa.h>
|
||
|
|
||
|
#define MICASA_KEYS_CONTRACTID "@novell.com/CASA/MiCASAKeys;1"
|
||
|
#define MICASA_KEYS_CLASSNAME "Common Authentication Services Adapter"
|
||
|
// {287249D7-A851-4aa4-9AEE-5BCDA3B53566}
|
||
|
#define MICASA_KEYS_CID { 0x287249d7, 0xa851, 0x4aa4, { 0x9a, 0xee, 0x5b, 0xcd, 0xa3, 0xb5, 0x35, 0x66 } }
|
||
|
|
||
|
// External prototypes not yet in micasa.h
|
||
|
typedef
|
||
|
void *
|
||
|
(*PCASAOPEN)(
|
||
|
SSCS_SECRETSTORE_T * ssid,
|
||
|
unsigned long ssFlags,
|
||
|
SSCS_EXT_T * ext
|
||
|
);
|
||
|
|
||
|
typedef
|
||
|
int
|
||
|
(*PCASACLOSE)(
|
||
|
void * context,
|
||
|
unsigned long ssFlags,
|
||
|
SSCS_EXT_T * ext
|
||
|
);
|
||
|
|
||
|
|
||
|
typedef
|
||
|
int
|
||
|
(*PCASAWRITEKEY)(
|
||
|
void * context,
|
||
|
uint32_t ssFlags,
|
||
|
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||
|
SSCS_SECRET_ID_T * sharedSecretID,
|
||
|
SS_UTF8_T * key,
|
||
|
uint32_t keyLen,
|
||
|
uint8_t * val,
|
||
|
uint32_t valLen,
|
||
|
SSCS_PASSWORD_T * epPassword,
|
||
|
SSCS_EXT_T * ext
|
||
|
);
|
||
|
|
||
|
typedef
|
||
|
int
|
||
|
(*PCASAREADKEY)(
|
||
|
void * context,
|
||
|
uint32_t ssFlags,
|
||
|
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||
|
SSCS_SECRET_ID_T * sharedSecretID,
|
||
|
SS_UTF8_T * key,
|
||
|
uint32_t keyLen,
|
||
|
uint8_t * val,
|
||
|
uint32_t * valLen,
|
||
|
SSCS_PASSWORD_T * epPassword,
|
||
|
uint32_t * bytesRequired,
|
||
|
SSCS_EXT_T * ext
|
||
|
);
|
||
|
|
||
|
typedef void * HANDLE;
|
||
|
|
||
|
#define TRUE 1
|
||
|
#define FALSE 0
|
||
|
|
||
|
|
||
|
/* Header file */
|
||
|
class MiCASAKeys : public IMiCASAKeys
|
||
|
{
|
||
|
public:
|
||
|
NS_DECL_ISUPPORTS
|
||
|
NS_DECL_IMICASAKEYS
|
||
|
|
||
|
MiCASAKeys();
|
||
|
|
||
|
private:
|
||
|
~MiCASAKeys();
|
||
|
void * m_hCASALibrary;
|
||
|
int m_bLibraryLoaded;
|
||
|
|
||
|
PCASAOPEN m_pCASAOpen;
|
||
|
PCASACLOSE m_pCASAClose;
|
||
|
PCASAWRITEKEY m_pCASAWriteKey;
|
||
|
PCASAREADKEY m_pCASAReadKey;
|
||
|
|
||
|
protected:
|
||
|
/* additional members */
|
||
|
};
|
||
|
|
||
|
#endif //_MICASA_KEYS_H_
|