Moving micasa 1.5 trunk to Novell forge.
This commit is contained in:
520
include/micasa.h
Normal file
520
include/micasa.h
Normal file
@@ -0,0 +1,520 @@
|
||||
/**************************************************************************
|
||||
Copyright (c) [2005] Novell, Inc. All Rights Reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free Software Foundation;
|
||||
version 2.1 of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, if not, contact Novell, Inc.
|
||||
To contact Novell about this file by physical or electronic mail,
|
||||
you may find current contact information at www.novell.com.
|
||||
**************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* This is the SecretStore Client Service IDK Interfaces
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _MICASA_H_
|
||||
#define _MICASA_H_
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "micasa_mgmd.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*** All strings are length preceeded and the lengths include the NULL.
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
*** most apis use a parameter called ssFlags, defined here
|
||||
***************************************************************************/
|
||||
#define SSFLAG_DESTROY_SESSION_F 0x00000001L // used with miCASACloseSecretStoreCache
|
||||
|
||||
|
||||
#define SSCS_SESSION_KEY_CHAIN_F 0x00000002L
|
||||
#define SSCS_LOCAL_KEY_CHAIN_F 0x00000004L
|
||||
#define SSCS_REMOTE_KEY_CHAIN_F 0x00000008L
|
||||
|
||||
|
||||
// ######################### FIRST RELEASE ############################
|
||||
// Session key chain is maintained only in only in cache during the usr session */
|
||||
/* FLAGS: (SSCS_SESSION_KEY_CHAIN_F) */
|
||||
#define SSCS_S_KC_ID_F (SSCS_SESSION_KEY_CHAIN_F)
|
||||
#define SSCS_S_KC_ID_CHARS 26
|
||||
static SS_UTF8_T SSCS_SESSION_KEY_CHAIN_ID[] = {"SSCS_SESSION_KEY_CHAIN_ID"};
|
||||
// {'S','S','C','S','_','S','E','S','S','I','O','N','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
// ######################### FIRST RELEASE ############################
|
||||
|
||||
// ######################### FUTURE RELEASE ############################
|
||||
// Persistent Private Keychain:
|
||||
// A Local keychain that is cached and is persistent */
|
||||
#define SSCS_PPV_KC_ID_F SSCS_SL_KC_ID_F
|
||||
#define SSCS_PPV_KC_CHARS 24
|
||||
#define SSCS_PERSISTENT_PRIVATE_KEYCHAIN_ID SSCS_LOCAL_KEY_CHAIN_ID
|
||||
|
||||
|
||||
// Public Keychain:
|
||||
// A Remote keychain that is cached locally only for the user session
|
||||
#define SSCS_PB_KC_F SSCS_SR_KC_ID_F
|
||||
#define SSCS_PB_KC_ID_CHARS 25
|
||||
#define SSCS_PUBLIC_KEYCHAIN_ID SSCS_REMOTE_KEY_CHAIN_ID
|
||||
|
||||
|
||||
// Persistent Public Keychain:
|
||||
// A Remote keychain that is cached locally and is persistent */
|
||||
#define SSCS_PPB_KC_F SSCS_SLR_KC_ID_F
|
||||
#define SSCS_PPB_KC_ID_CHARS 31
|
||||
#define SSCS_PERSISTENT_PUBLIC_KEYCHAIN_ID SSCS_LOCAL_REMOTE_KEY_CHAIN_ID
|
||||
// ######################### FUTURE RELEASE ############################
|
||||
|
||||
// Default SecretID
|
||||
static SS_UTF8_T SECRET_ID_DEFAULT[] = {"Default_Credential"};
|
||||
#define SECRET_ID_DEFAULT_LEN 19
|
||||
|
||||
// Known keys for Shared Secret format
|
||||
// ===============================================
|
||||
static SS_UTF8_T SHS_PASSWORD[] = {"Password"};
|
||||
// {'P','a','s','s','s','w','o','r','d','=',0};
|
||||
#define SHS_PASSWORD_LEN 9
|
||||
|
||||
static SS_UTF8_T SHS_USERNAME[] = {"Username"};
|
||||
// {'U','s','e','r','n','a','m','e','=',0};
|
||||
#define SHS_USER_NAME_LEN 9
|
||||
|
||||
static SS_UTF8_T SHS_OTHER[] = {"Other"};
|
||||
//{'O','t','h','e','r','=',0};
|
||||
#define SHS_OTHER_LEN 6
|
||||
|
||||
static SS_UTF8_T SHS_BINARY[] = {"Binary"};
|
||||
//{'B','i','n','a','r','y','=',0};
|
||||
#define SHS_BINARY_LEN 7
|
||||
|
||||
// Common Name
|
||||
static SS_UTF8_T SHS_CN[] = {"CN"};
|
||||
//{'C','N','=',0};
|
||||
#define SHS_CN_LEN 3
|
||||
|
||||
// LDAP DN
|
||||
static SS_UTF8_T SHS_DN_LDAP[] = {"DN_LDAP"};
|
||||
//{'D','N','L','D','A','P','=',0};
|
||||
#define SHS_DNLDAP_LEN 8
|
||||
|
||||
// NDAP DN
|
||||
static SS_UTF8_T SHS_DN_NDAP[] = {"DN_NDAP"};
|
||||
//{'D','N','N','D','A','P','=',0};
|
||||
#define SHS_DNNDAP_LEN 8
|
||||
|
||||
// NDAP FDN
|
||||
static SS_UTF8_T SHS_FDN_NDAP[] = {"FDN_NDAP"};
|
||||
#define SHS_FDNNDAP_LEN 9
|
||||
|
||||
// EMAIL NAME
|
||||
static SS_UTF8_T SHS_EMAIL[] = {"EMAIL"};
|
||||
//{'E','M','A','I','L','=',0};
|
||||
#define SHS_EMAIL_LEN 6
|
||||
|
||||
|
||||
|
||||
/* STANDARD KEYCHAIN IDs */
|
||||
|
||||
/* Persistent local keychain that is cached */
|
||||
/* FLAGS: (SSCS_SESSION_KEY_CHAIN_F | SSCS_LOCAL_KEY_CHAIN_F) */
|
||||
#define SSCS_SL_KC_ID_F (SSCS_SESSION_KEY_CHAIN_F | SSCS_LOCAL_KEY_CHAIN_F)
|
||||
#define SSCS_SL_KC_ID_CHARS 24
|
||||
// #define SSCS_SL_KC_LEN 48
|
||||
static SS_UTF8_T SSCS_LOCAL_KEY_CHAIN_ID[] = {"SSCS_LOCAL_KEY_CHAIN_ID"};
|
||||
// {'S','S','C','S','_','L','O','C','A','L','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
//
|
||||
/* A Remote keychain that is cached locally only for the user session
|
||||
/* FLAGS: (SSCS_SESSION_KEY_CHAIN_F | SSCS_REMOTE_KEY_CHAIN_F) */
|
||||
#define SSCS_SR_KC_ID_F (SSCS_SESSION_KEY_CHAIN_F | SSCS_REMOTE_KEY_CHAIN_F)
|
||||
#define SSCS_SR_KC_ID_CHARS 25
|
||||
// #define SSCS_SR_KC_ID_LEN 50
|
||||
static SS_UTF8_T SSCS_REMOTE_KEY_CHAIN_ID[] = {"SSCS_REMOTE_KEY_CHAIN_ID"};
|
||||
// {'S','S','C','S','_','R','E','M','O','T','E','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
|
||||
/* A Remote keychain that is cached locally and is persistent */
|
||||
/* FLAGS: (SSCS_SESSION_KEY_CHAIN_F | SSCS_REMOTE_KEY_CHAIN_F | SSCS_LOCAL_KEY_CHAIN_F) */
|
||||
#define SSCS_SLR_KC_ID_F (SSCS_SESSION_KEY_CHAIN_F | SSCS_REMOTE_KEY_CHAIN_F | SSCS_LOCAL_KEY_CHAIN_F)
|
||||
#define SSCS_SLR_KC_ID_CHARS 31
|
||||
// #define SSCS_SLR_KC_ID_LEN 62
|
||||
static SS_UTF8_T SSCS_LOCAL_REMOTE_KEY_CHAIN_ID[] = {"SSCS_LOCAL_REMOTE_KEY_CHAIN_ID"};
|
||||
// {'S','S','C','S','_','L','O','C','A','L','_','R','E','M','O','T','E','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
|
||||
|
||||
#define NSSCS_VERSION_NUMBER 0x00040000L // client version Major 04 Minor 00 Revision 01
|
||||
// the final release will be 4.0.0
|
||||
|
||||
|
||||
#define NSSCS_MIN_SECRET_BUF_LEN 3968 //* (4K-128)to match server
|
||||
#define NSSCS_MID_SECRET_BUF_LEN 32768 //* (4K-128)to match server
|
||||
#define NSSCS_MAX_SECRET_BUF_LEN 60416 //* (59K)to match server
|
||||
#define NSSCS_MAX_PWORD_HINT_LEN 128 //* maximum hint (bytes)
|
||||
|
||||
|
||||
#define NSSCS_MAX_KEYCHAIN_ID_LEN 256 //* in bytes including NULL
|
||||
|
||||
#define NSSCS_MAX_NUM_OF_DEFAULT_KEYCHAINS 6
|
||||
|
||||
#define NSSCS_MIN_IDLIST_BUF_LEN 16384 //* (16K)
|
||||
#define NSSCS_MID_IDLIST_BUF_LEN 32768 //* (32K)
|
||||
#define NSSCS_MAX_IDLIST_BUF_LEN 65536 //* (64kK)
|
||||
#define NSSCS_JUMBO_IDLIST_BUF_LEN 131072 //* (128K)
|
||||
#define NSSCS_JUMBO_ENUM_BUF_LEN 131072 //* (128K)
|
||||
#define NSSCS_ENUM_BUFFER_GUESS 32768 //* (32K)
|
||||
#define NSSCS_ENUM_DELIM ((SS_UTF8_T)'*') //* immutable
|
||||
#define NSSCS_MAX_SRCH_KEY_LEN 128 //* maximum hint (bytes)
|
||||
|
||||
#define SSCS_APPLICATION_TYPE_F 0x00000001L
|
||||
#define SSCS_CREDENTIAL_TYPE_F 0x00000002L
|
||||
|
||||
#define NSSCS_MAX_PASSCODE_LEN 256
|
||||
|
||||
|
||||
static SS_UTF8_T SSCS_DEFAULT_SECRETSTORE_ID[] = {"SecretStore"};
|
||||
//{'S','e','c','r','e','t','S','t','o','r','e', 0};
|
||||
#define SSCS_DEFAULT_SECRETSTORE_ID_LEN 12
|
||||
|
||||
|
||||
static SS_UTF8_T SSCS_CRED_SET[] = {"SS_CredSet"};
|
||||
//{'S','S','_','C','r','e','d','S','e','t', 0};
|
||||
#define SSCS_CRED_SET_LEN 10
|
||||
|
||||
static SS_UTF8_T SSCS_BINARY_SECRET[] = {"SS_Binary"};
|
||||
//{'S','S','_','B','i','n','a','r','y', 0};
|
||||
#define SSCS_BINARY_CHARS 9
|
||||
|
||||
static SS_UTF8_T APP_DELIMITER[] = {":"};
|
||||
#define APP_DELIMITER_LEN 2
|
||||
|
||||
static SS_UTF8_T CREDSET_DELIMITER[] = {"="};
|
||||
#define CREDSET_DELIMITER_LEN 2
|
||||
|
||||
static SS_UTF8_T BINARY_DELIMITER[] = {"="};
|
||||
#define BINARY_DELIMITER_LEN 2
|
||||
|
||||
|
||||
#define SSCS_MASTER_PASSWORD 1
|
||||
#define SSCS_ENHANCED_PROTECTION_PASSWORD 2
|
||||
#define SSCS_DIRECTORY_PASSWORD 1
|
||||
|
||||
|
||||
typedef struct _sscs_password
|
||||
{
|
||||
unsigned long pwordType;
|
||||
unsigned long pwordLen; // enhanced protection len & pword to set
|
||||
SS_UTF8_T pword[NSSCS_MAX_PWORD_LEN]; // * should be passed in # of chars
|
||||
} SSCS_PASSWORD_T;
|
||||
|
||||
|
||||
typedef struct _sscs_sh_secret_id
|
||||
{
|
||||
uint32_t type; // The shared secret type i.e. SS_App or SS_CredSet
|
||||
uint32_t len; // except that it excludes the header and is not escaped.
|
||||
SS_UTF8_T name[NSSCS_MAX_SECRET_ID_LEN]; // The shared secret name. This is the same as the identifier
|
||||
} SSCS_SH_SECRET_ID_T;
|
||||
|
||||
typedef struct _sscs_passcode
|
||||
{
|
||||
uint32_t passcodeType;
|
||||
void *passcodeHandle; // can be password structure or other types of structures.
|
||||
} SSCS_PASSCODE_T;
|
||||
|
||||
|
||||
typedef struct _sscs_secretstore
|
||||
{
|
||||
uint32_t version;
|
||||
SS_UTF8_T ssName[NSSCS_MAX_SECRET_ID_LEN];
|
||||
} SSCS_SECRETSTORE_T;
|
||||
|
||||
typedef struct _ssscs_read_extension
|
||||
{
|
||||
uint32_t statFlags; //* OUT - return flags on the secret
|
||||
uint32_t crtStamp; //* OUT - secret creation time stamp
|
||||
uint32_t latStamp; //* OUT - last accessed time stamp (optional)
|
||||
uint32_t lmtStamp; //* OUT - last modified time stamp
|
||||
} SSCS_READEXT_T;
|
||||
|
||||
typedef struct _sscs_hint
|
||||
{
|
||||
uint32_t hintLen;
|
||||
SS_UTF8_T hint[NSSCS_MAX_PWORD_HINT_LEN]; //* should be passed in # of chars
|
||||
} SSCS_HINT_T;
|
||||
|
||||
|
||||
typedef struct _sscs_secretstore_info
|
||||
{
|
||||
uint32_t numKeyChains;
|
||||
uint32_t enumBufsize;
|
||||
} SSCS_SECRETSTORE_INFO_T;
|
||||
|
||||
typedef struct _sscs_srch_key
|
||||
{
|
||||
uint32_t srchKeyLen;
|
||||
SS_UTF8_T srchKey[NSSCS_MAX_SRCH_KEY_LEN]; //* should be passed in # of chars
|
||||
} SSCS_SRCH_KEY_T;
|
||||
|
||||
|
||||
typedef struct _sscs_sh_secret_ID_List
|
||||
{
|
||||
uint32_t enumHandle; // set to 0 to begin with
|
||||
uint32_t returnedIDs; // to be initialized by the caller to the array size
|
||||
SSCS_SH_SECRET_ID_T *secIDList; //* an array of secret IDs structures.
|
||||
} SSCS_SH_SECRET_ID_LIST_T;
|
||||
|
||||
typedef struct _sscs_keychain_id
|
||||
{
|
||||
uint32_t len;
|
||||
SS_UTF8_T keychainID[NSSCS_MAX_SECRET_ID_LEN];
|
||||
} SSCS_KEYCHAIN_ID_T;
|
||||
|
||||
typedef struct _sscs_keychain_id_list
|
||||
{
|
||||
uint32_t enumHandle; // set to 0 to begin with
|
||||
uint32_t returnedIDs; // to be initialized by the caller to the array size
|
||||
SSCS_KEYCHAIN_ID_T *keyChainIDList; //* an array of keychainID structures
|
||||
} SSCS_KEYCHAIN_ID_LIST_T;
|
||||
|
||||
|
||||
|
||||
|
||||
// **************************************************************
|
||||
// * The following functions will be exposed as exported API:
|
||||
// **************************************************************
|
||||
// * SSCS APIs below export the interface for applications.
|
||||
// * Support APIs are needed for populating or extracting data
|
||||
// * from a Shared Secret.
|
||||
// **************************************************************
|
||||
|
||||
SSCS_EXTERN_LIBCALL_PTR(void)
|
||||
miCASAOpenSecretStoreCache
|
||||
(
|
||||
SSCS_SECRETSTORE_T * ssid,
|
||||
uint32_t ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASACloseSecretStoreCache
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAReadSecret
|
||||
(
|
||||
void * context,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
uint32_t ssFlags,
|
||||
void * secretHandle,
|
||||
SSCS_SH_SECRET_ID_T * sharedSecretID,
|
||||
SSCS_PASSWORD_T * epPassword,
|
||||
SSCS_READEXT_T * readData,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASARemoveSecret
|
||||
(
|
||||
void * context,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SH_SECRET_ID_T * sharedSecretID,
|
||||
SSCS_PASSWORD_T * epPassword,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAWriteSecret
|
||||
(
|
||||
void * context,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
uint32_t ssFlags,
|
||||
void * secretHandle,
|
||||
SSCS_SH_SECRET_ID_T * sharedSecretID,
|
||||
SSCS_PASSWORD_T * epPassword,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAGetStoreInformation
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SECRETSTORE_INFO_T * ssInfo,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAEnumerateSecretIDs
|
||||
(
|
||||
void * context,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SRCH_KEY_T * searchKey,
|
||||
SSCS_SH_SECRET_ID_LIST_T * secretIDList,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASARemoveSecretStore
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASASetMasterPassword
|
||||
(
|
||||
uint32_t ssFlags,
|
||||
SSCS_PASSWORD_T * password,
|
||||
SSCS_HINT_T * hint,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAUnlockSecrets
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_PASSWORD_T * password,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASALockStore
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAUnlockStore
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_PASSCODE_T * passcode,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAEnumerateKeyChainIDs
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SRCH_KEY_T * searchKey,
|
||||
SSCS_KEYCHAIN_ID_LIST_T * kcIDList,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAAddKeyChain
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASARemoveKeyChain
|
||||
(
|
||||
void * context,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T * keyChainID,
|
||||
SSCS_EXT_T * ext
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAWriteKey
|
||||
(
|
||||
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
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASASetMasterPasscode
|
||||
(
|
||||
uint32_t ssFlags,
|
||||
SSCS_PASSCODE_T *passcode,
|
||||
SSCS_EXT_T *ext
|
||||
);
|
||||
|
||||
|
||||
|
||||
//**************************************************************
|
||||
//* Support Functions for processing (populating or extracting)
|
||||
//* data components from Shared Secrets
|
||||
//**************************************************************
|
||||
SSCS_EXTERN_LIBCALL_PTR(void)
|
||||
miCASA_CreateSHSHandle();
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASA_DestroySHSHandle(void *secretHandle); // in
|
||||
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASA_GetNextSHSEntry
|
||||
(
|
||||
int32_t restart,
|
||||
void *secretHandle,
|
||||
uint32_t *keyLen,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t *valLen,
|
||||
uint8_t *value
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASA_AddSHSEntry
|
||||
(
|
||||
void *secretHandle,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t valueLen,
|
||||
uint8_t *value
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASA_RemoveSHSEntry
|
||||
(
|
||||
void *secretHandle,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t valueLen,
|
||||
uint8_t *value
|
||||
);
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _miCASA_H */
|
||||
458
include/micasa_mgmd.h
Normal file
458
include/micasa_mgmd.h
Normal file
@@ -0,0 +1,458 @@
|
||||
/**************************************************************************
|
||||
Copyright (c) [2005] Novell, Inc. All Rights Reserved.
|
||||
|
||||
This library is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the Free Software Foundation;
|
||||
version 2.1 of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this library; if not, if not, contact Novell, Inc.
|
||||
To contact Novell about this file by physical or electronic mail,
|
||||
you may find current contact information at www.novell.com.
|
||||
**************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* This is the Managed IDK for collaborating suite of applications
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _MICASA_MANAGED_H_
|
||||
#define _MICASA_MANAGED_H_
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/***************************************************************************
|
||||
*** All strings are length preceeded and the lengths include the NULL.
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
#define SSCS_GLOBAL_LIBCALL_PTR(RET) RET * __stdcall
|
||||
#define SSCS_GLOBAL_LIBCALL(RET) RET __stdcall
|
||||
#define SSCS_EXTERN_LIBCALL_PTR(RET) extern RET * __stdcall
|
||||
#define SSCS_EXTERN_LIBCALL(RET) extern RET __stdcall
|
||||
#define SSCS_TYPEDEF_LIBCALL_PTR(RET, PTR) typedef RET * (__stdcall *PTR)
|
||||
#define SSCS_TYPEDEF_LIBCALL(RET, PTR) typedef RET (__stdcall *PTR)
|
||||
|
||||
#else
|
||||
|
||||
#define SSCS_GLOBAL_LIBCALL_PTR(RET) RET *
|
||||
#define SSCS_GLOBAL_LIBCALL(RET) RET
|
||||
#define SSCS_EXTERN_LIBCALL_PTR(RET) extern RET *
|
||||
#define SSCS_EXTERN_LIBCALL(RET) extern RET
|
||||
#define SSCS_TYPEDEF_LIBCALL_PTR(RET, PTR) typedef RET * (*PTR)
|
||||
#define SSCS_TYPEDEF_LIBCALL(RET, PTR) typedef RET (*PTR)
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
#ifndef _MICASA_TYPES_H_
|
||||
#define _MICASA_TYPES_H_
|
||||
|
||||
#if defined(WIN32)
|
||||
#include <stdio.h>
|
||||
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed char int_t;
|
||||
|
||||
#else
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _SSUTF8_H_
|
||||
/* defining the utf8 for SSCS */
|
||||
typedef unsigned char SS_UTF8_T;
|
||||
#endif
|
||||
|
||||
#define NSSCS_MAX_USERID_LEN 256 //* max username (bytes)
|
||||
#define NSSCS_MAX_PWORD_LEN 128 //* max password (bytes)
|
||||
#define NSSCS_MAX_SECRET_ID_LEN 512 //* in bytes including NULL
|
||||
|
||||
// used to denote what structure is being used for the credentials
|
||||
#define SSCS_CRED_TYPE_BASIC_F 0x00000001L
|
||||
|
||||
// used to denote the type of username being requested or set
|
||||
#define USERNAME_TYPE_CN_F 0x00000000L // default behavior
|
||||
#define USERNAME_TYPE_NDS_DN_F 0x00000001L
|
||||
#define USERNAME_TYPE_NDS_FDN_F 0x00000002L
|
||||
#define USERNAME_TYPE_LDAP_DN_F 0x00000004L
|
||||
#define USERNAME_TYPE_EMAIL_F 0x00000008L
|
||||
#define USERNAME_TYPE_OTHER_F 0x00000010L
|
||||
|
||||
typedef struct _sscs_secret_id
|
||||
{
|
||||
uint32_t len; // max id len in bytes
|
||||
SS_UTF8_T id[NSSCS_MAX_SECRET_ID_LEN]; // * should be passed in # of chars
|
||||
} SSCS_SECRET_ID_T;
|
||||
|
||||
|
||||
typedef struct _sscs_basic_credential
|
||||
{
|
||||
uint32_t unFlags;
|
||||
uint32_t unLen;
|
||||
SS_UTF8_T username[NSSCS_MAX_USERID_LEN];
|
||||
uint32_t pwordLen;
|
||||
SS_UTF8_T password[NSSCS_MAX_PWORD_LEN];
|
||||
} SSCS_BASIC_CREDENTIAL;
|
||||
|
||||
|
||||
typedef struct _sscs_ext_t
|
||||
{
|
||||
int32_t extID; // defined to identify the extension
|
||||
int32_t version; // defined as the version of the specified extension
|
||||
void *ext; // points to the actual extension
|
||||
} SSCS_EXT_T;
|
||||
|
||||
/* ####################################################################### */
|
||||
/* ############################## ERROR CODES ############################ */
|
||||
/* ####################################################################### */
|
||||
|
||||
#define NSSCS_SUCCESS 0x00000000 /* 0 */
|
||||
#define NSSCS_E_OBJECT_NOT_FOUND 0xFFFFFCE0 /* -800 */
|
||||
#define NSSCS_E_NICI_FAILURE 0xFFFFFCDF /* -801 */
|
||||
#define NSSCS_E_INVALID_SECRET_ID 0xFFFFFCDE /* -802 */
|
||||
#define NSSCS_E_SYSTEM_FAILURE 0xFFFFFCDD /* -803 */
|
||||
#define NSSCS_E_ACCESS_DENIED 0xFFFFFCDC /* -804 */
|
||||
#define NSSCS_E_NDS_INTERNAL_FAILURE 0xFFFFFCDB /* -805 */
|
||||
#define NSSCS_E_SECRET_UNINITIALIZED 0xFFFFFCDA /* -806 */
|
||||
#define NSSCS_E_BUFFER_LEN 0xFFFFFCD9 /* -807 */
|
||||
#define NSSCS_E_INCOMPATIBLE_VERSION 0xFFFFFCD8 /* -808 */
|
||||
#define NSSCS_E_CORRUPTED_STORE 0xFFFFFCD7 /* -809 */
|
||||
#define NSSCS_E_SECRET_ID_EXISTS 0xFFFFFCD6 /* -810 */
|
||||
#define NSSCS_E_NDS_PWORD_CHANGED 0xFFFFFCD5 /* -811 */
|
||||
#define NSSCS_E_INVALID_TARGET_OBJECT 0xFFFFFCD4 /* -812 */
|
||||
#define NSSCS_E_STORE_NOT_FOUND 0xFFFFFCD3 /* -813 */
|
||||
#define NSSCS_E_SERVICE_NOT_FOUND 0xFFFFFCD2 /* -814 */
|
||||
#define NSSCS_E_SECRET_ID_TOO_LONG 0xFFFFFCD1 /* -815 */
|
||||
#define NSSCS_E_ENUM_BUFF_TOO_SHORT 0xFFFFFCD0 /* -816 */
|
||||
#define NSSCS_E_NOT_AUTHENTICATED 0xFFFFFCCF /* -817 */
|
||||
#define NSSCS_E_NOT_SUPPORTED 0xFFFFFCCE /* -818 */
|
||||
#define NSSCS_E_NDS_PWORD_INVALID 0xFFFFFCCD /* -819 */
|
||||
#define NSSCS_E_NICI_OUTOF_SYNC 0xFFFFFCCC /* -820 */
|
||||
#define NSSCS_E_SERVICE_NOT_SUPPORTED 0xFFFFFCCB /* -821 */
|
||||
#define NSSCS_E_TOKEN_NOT_SUPPORTED 0xFFFFFCCA /* -822 */
|
||||
#define NSSCS_E_UNICODE_OP_FAILURE 0xFFFFFCC9 /* -823 */
|
||||
#define NSSCS_E_TRANSPORT_FAILURE 0xFFFFFCC8 /* -824 */
|
||||
#define NSSCS_E_CRYPTO_OP_FAILURE 0xFFFFFCC7 /* -825 */
|
||||
#define NSSCS_E_SERVER_CONN_FAILURE 0xFFFFFCC6 /* -826 */
|
||||
#define NSSCS_E_CONN_ACCESS_FAILURE 0xFFFFFCC5 /* -827 */
|
||||
#define NSSCS_E_ENUM_BUFF_TOO_LONG 0xFFFFFCC4 /* -828 */
|
||||
#define NSSCS_E_SECRET_BUFF_TOO_LONG 0xFFFFFCC3 /* -829 */
|
||||
#define NSSCS_E_SECRET_ID_TOO_SHORT 0xFFFFFCC2 /* -830 */
|
||||
#define NSSCS_E_CORRUPTED_PACKET_DATA 0xFFFFFCC1 /* -831 */
|
||||
#define NSSCS_E_EP_ACCESS_DENIED 0xFFFFFCC0 /* -832 */
|
||||
#define NSSCS_E_SCHEMA_NOT_EXTENDED 0xFFFFFCBF /* -833 */
|
||||
#define NSSCS_E_ATTR_NOT_FOUND 0xFFFFFCBE /* -834 */
|
||||
#define NSSCS_E_MIGRATION_NEEDED 0xFFFFFCBD /* -835 */
|
||||
#define NSSCS_E_MP_PWORD_INVALID 0xFFFFFCBC /* -836 */
|
||||
#define NSSCS_E_MP_PWORD_NOT_SET 0xFFFFFCBB /* -837 */
|
||||
#define NSSCS_E_MP_PWORD_NOT_ALLOWED 0xFFFFFCBA /* -838 */
|
||||
#define NSSCS_E_WRONG_REPLICA_TYPE 0xFFFFFCB9 /* -839 */
|
||||
#define NSSCS_E_ATTR_VAL_NOT_FOUND 0xFFFFFCB8 /* -840 */
|
||||
#define NSSCS_E_INVALID_PARAM 0xFFFFFCB7 /* -841 */
|
||||
#define NSSCS_E_NEED_SECURE_CHANNEL 0xFFFFFCB6 /* -842 */
|
||||
#define NSSCS_E_CONFIG_NOT_SUPPORTED 0xFFFFFCB5 /* -843 */
|
||||
#define NSSCS_E_STORE_NOT_LOCKED 0xFFFFFCB4 /* -844 */
|
||||
#define NSSCS_E_TIME_OUT_OF_SYNC 0xFFFFFCB3 /* -845 */
|
||||
#define NSSCS_E_VERSION_MISMATCH 0xFFFFFCB2 /* -846 */
|
||||
#define NSSCS_E_SECRET_BUFF_TOO_SHORT 0xFFFFFCB1 /* -847 */
|
||||
#define NSSCS_E_SH_SECRET_FAILURE 0xFFFFFCB0 /* -848 */
|
||||
#define NSSCS_E_PARSER_FAILURE 0xFFFFFCAF /* -849 */
|
||||
#define NSSCS_E_UTF8_OP_FAILURE 0xFFFFFCAE /* -850 */
|
||||
#define NSSCS_E_CTX_LESS_CN_NOT_UNIQUE 0xFFFFFCAD /* -851 */
|
||||
#define NSSCS_E_UNSUPPORTED_BIND_CRED 0xFFFFFCAC /* -852 */
|
||||
#define NSSCS_E_CERTIFICATE_NOT_FOUND 0xFFFFFCAB /* -853 */
|
||||
#define NSSCS_E_CANT_OPEN_CLIENT_CACHE 0xFFFFFCAA /* -854 */
|
||||
#define NSSCS_E_WRONG_SH_SEC_TYPE 0xFFFFFCA9 /* -855 */
|
||||
|
||||
#define NSSCS_E_NOT_IMPLEMENTED 0xFFFFFC88 /* -888 */
|
||||
#define NSSCS_E_BETA_EXPIRED 0xFFFFFC7D /* -899 */
|
||||
|
||||
|
||||
/* #########################################################################
|
||||
########################### ERROR DESCRIPTIONS ##########################
|
||||
#########################################################################
|
||||
|
||||
NSSCS_E_OBJECT_NOT_FOUND -800
|
||||
Description: Can't find the target object DN in NDS. (Resolve name failed.)
|
||||
|
||||
NSSCS_E_NICI_FAILURE -801
|
||||
Description: NICI operations have failed.
|
||||
|
||||
NSSCS_E_INVALID_SECRET_ID -802
|
||||
Description: Secret ID is not in the User Secret Store.
|
||||
|
||||
NSSCS_E_SYSTEM_FAILURE -803
|
||||
Description: Some internal operating system services have not been available.
|
||||
|
||||
NSSCS_E_ACCESS_DENIED -804
|
||||
Description: Access to the target Secret Store has been denied!
|
||||
|
||||
NSSCS_E_NDS_INTERNAL_FAILURE -805
|
||||
Description: Some internal NDS services have not been available.
|
||||
|
||||
NSSCS_E_SECRET_UNINITIALIZED -806
|
||||
Description: Secret has not been initialized with a write.
|
||||
|
||||
NSSCS_E_BUFFER_LEN -807
|
||||
Description: Size of the buffer is not in a nominal range between minimum and maximum.
|
||||
|
||||
NSSCS_E_INCOMPATIBLE_VERSION -808
|
||||
Description: Client and server components are not of the compatible versions.
|
||||
|
||||
NSSCS_E_CORRUPTED_STORE -809
|
||||
Description: Secret Store data on the server has been corrupted.
|
||||
|
||||
NSSCS_E_SECRET_ID_EXISTS -810
|
||||
Description: Secret ID already exists in the Secret Store.
|
||||
|
||||
NSSCS_E_NDS_PWORD_CHANGED -811
|
||||
Description: User NDS password has been changed by the administrator.
|
||||
|
||||
NSSCS_E_INVALID_TARGET_OBJECT -812
|
||||
Description: Target NDS User object not found.
|
||||
|
||||
NSSCS_E_STORE_NOT_FOUND -813
|
||||
Description: Target NDS User object does not have a Secret Store.
|
||||
|
||||
NSSCS_E_SERVICE_NOT_FOUND -814
|
||||
Description: Secret Store not on the Network.
|
||||
|
||||
NSSCS_E_SECRET_ID_TOO_LONG -815
|
||||
Description: Lenght of the Secret ID buffer exceeds the limit.
|
||||
|
||||
NSSCS_E_ENUM_BUFF_TOO_SHORT -816
|
||||
Description: Lenght of the Enumeration buffer too short.
|
||||
|
||||
NSSCS_E_NOT_AUTHENTICATED -817
|
||||
Description: User not authenticated.
|
||||
|
||||
NSSCS_E_NOT_SUPPORTED -818
|
||||
Description: Not supported operations.
|
||||
|
||||
NSSCS_E_NDS_PWORD_INVALID -819
|
||||
Description: Typed in NDS password not valid.
|
||||
|
||||
NSSCS_E_NICI_OUTOF_SYNC -820
|
||||
Description: Session keys of the client and server NICI are out of sync.
|
||||
|
||||
NSSCS_E_SERVICE_NOT_SUPPORTED -821
|
||||
Description: Requested service not supported yet.
|
||||
|
||||
NSSCS_E_TOKEN_NOT_SUPPORTED -822
|
||||
Description: NDS authentication type not supported.
|
||||
|
||||
NSSCS_E_UNICODE_OP_FAILURE -823
|
||||
Description: Unicode text conversion operation failed.
|
||||
|
||||
NSSCS_E_TRANSPORT_FAILURE -824
|
||||
Description: Connection to server is lost.
|
||||
|
||||
NSSCS_E_CRYPTO_OP_FAILURE -825
|
||||
Description: Cryptographic operation failed.
|
||||
|
||||
NSSCS_E_SERVER_CONN_FAILURE -826
|
||||
Description: Opening a connection to the server failed.
|
||||
|
||||
NSSCS_E_CONN_ACCESS_FAILURE -827
|
||||
Description: Access to server connection failed.
|
||||
|
||||
NSSCS_E_ENUM_BUFF_TOO_LONG -828
|
||||
Description: Size of the enumeration buffer exceeds the limit.
|
||||
|
||||
NSSCS_E_SECRET_BUFF_TOO_LONG -829
|
||||
Description: Size of the Secret buffer exceeds the limit.
|
||||
|
||||
NSSCS_E_SECRET_ID_TOO_SHORT -830
|
||||
Description: Lenght of the Secret ID should be greater than zero.
|
||||
|
||||
NSSCS_E_CORRUPTED_PACKET_DATA -831
|
||||
Description: Protocol data corrupted on the wire.
|
||||
|
||||
NSSCS_E_EP_ACCESS_DENIED -832
|
||||
Description: EP password validation failed. Access to the secret denied!
|
||||
|
||||
NSSCS_E_SCHEMA_NOT_EXTENDED -833
|
||||
Description: Schema is not extended to support SecreStore on the target tree.
|
||||
|
||||
NSSCS_E_ATTR_NOT_FOUND -834
|
||||
Description: One of the optional service attributes is not instantiated.
|
||||
|
||||
NSSCS_E_MIGRATION_NEEDED -835
|
||||
Description: Server has been upgraded and user SecretStore should be updated.
|
||||
|
||||
NSSCS_E_MP_PWORD_INVALID -836
|
||||
Description: Master passwrod could not be verified to read or unlock the secrets.
|
||||
|
||||
NSSCS_E_MP_PWORD_NOT_SET -837
|
||||
Description: Master password has not been set on the SecretStore.
|
||||
|
||||
NSSCS_E_MP_PWORD_NOT_ALLOWED -838
|
||||
Description: Ability to use master password has been disabled.
|
||||
|
||||
NSSCS_E_WRONG_REPLICA_TYPE -839
|
||||
Description: Not a writeable replica of NDS.
|
||||
|
||||
NSSCS_E_ATTR_VAL_NOT_FOUND -840
|
||||
Description: Target attrbute is not instantiated in NDS.
|
||||
|
||||
NSSCS_E_INVALID_PARAM -841
|
||||
Description: API parameter is not initialized.
|
||||
|
||||
NSSCS_E_NEED_SECURE_CHANNEL -842
|
||||
Description: Connection to the SecretStore needs to be over SSL.
|
||||
|
||||
NSSCS_E_CONFIG_NOT_SUPPORTED -843
|
||||
Description: No server to support the given override configuration is found.
|
||||
|
||||
NSSCS_E_STORE_NOT_LOCKED -844
|
||||
Description: Attempt to unlock SecretStore failed because the store is not locked.
|
||||
|
||||
NSSCS_E_TIME_OUT_OF_SYNC -845
|
||||
Description: NDS Replica on the server that holds SecretStore is out of sync with the replica ring.
|
||||
|
||||
NSSCS_E_VERSION_MISMATCH -846
|
||||
Description: Versions of the client dlls don't match.
|
||||
|
||||
NSSCS_E_SECRET_BUFF_TOO_SHORT -847
|
||||
Description: Buffer supplied for the secret is too short (minimum NSSCS_MIN_IDLIST_BUF_LEN).
|
||||
|
||||
NSSCS_E_SH_SECRET_FAILURE -848
|
||||
Description: Shared Secret processing and operations failed.
|
||||
|
||||
NSSCS_E_PARSER_FAILURE -849
|
||||
Description: Shared Secret parser operations failed.
|
||||
|
||||
NSSCS_E_UTF8_OP_FAILURE -850
|
||||
Description: Utf8 string operations failed.
|
||||
|
||||
NSSCS_E_CTX_LESS_CN_NOT_UNIQUE -851
|
||||
Description: Contextless name for LDAP bind does not resolve to a unique DN
|
||||
|
||||
NSSCS_E_UNSUPPORTED_BIND_CRED -852
|
||||
Description: login credential for advanced bind is not supported
|
||||
|
||||
NSSCS_E_CERTIFICATE_NOT_FOUND -853
|
||||
Description: LDAP Root Cert required for Bind operations not found
|
||||
|
||||
NSSCS_E_WRONG_SH_SEC_TYPE -855
|
||||
Description: Unrecognized or unknown shared secret tag.
|
||||
|
||||
|
||||
NSSCS_E_NOT_IMPLEMENTED -888
|
||||
Description: Feature not implemented yet.
|
||||
|
||||
NSSCS_E_BETA_EXPIRED -899
|
||||
Description: Product's BETA life has expired! Official release copy should be
|
||||
purchased.
|
||||
|
||||
|
||||
|
||||
########################### END OFERROR CODES ########################## */
|
||||
|
||||
#endif // _SSCS_SDK_H_
|
||||
|
||||
|
||||
// * The following functions will be exposed as exported API:
|
||||
// **************************************************************
|
||||
// * These function calls will utilize the Support Functions for
|
||||
// * populating or extracting data from a Shared Secret.
|
||||
// **************************************************************
|
||||
|
||||
// General API Info:
|
||||
// All strings passed through the API need to be NULL terminated.
|
||||
//
|
||||
//
|
||||
// Parameters:
|
||||
// ssFlags
|
||||
// Sets behaviors desired on the Secret. Set to 0.
|
||||
//
|
||||
// appSecretID (input) -
|
||||
// Name of service requesting credentials.
|
||||
//
|
||||
// sharedSecretID (input) -
|
||||
// The group name is the name of the backend authentication realm, relating a group of services.
|
||||
// Example: Novell.Collaboration (Groupwise, GW address book, GW Notify, and GWIM)
|
||||
// This parameter can be set to NULL,
|
||||
//
|
||||
// credentialType (input)
|
||||
// Type of credential structure used during this call.
|
||||
// Currently we only support one:
|
||||
// SSCS_CRED_TYPE_BASIC_F
|
||||
//
|
||||
// credential
|
||||
// Pointer to the credential structure
|
||||
//
|
||||
// ext
|
||||
// Reserved.
|
||||
//
|
||||
// Abstract:
|
||||
//
|
||||
// Get cache user credentials routine.
|
||||
//
|
||||
//
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAGetCredential
|
||||
(
|
||||
uint32_t ssFlags, // IN
|
||||
SSCS_SECRET_ID_T * appSecretID, // IN
|
||||
SSCS_SECRET_ID_T * sharedSecretID, // Optional IN
|
||||
int32_t * credentialType, // IN/OUT
|
||||
void * credential, // OUT
|
||||
SSCS_EXT_T * ext // Reserved
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASASetCredential
|
||||
(
|
||||
uint32_t ssFlags, // IN
|
||||
SSCS_SECRET_ID_T * appSecretID, // IN
|
||||
SSCS_SECRET_ID_T * sharedSecretID, // Optional IN
|
||||
int32_t credentialType, // IN
|
||||
void * credential, // IN
|
||||
SSCS_EXT_T * ext // Reserved
|
||||
);
|
||||
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASARemoveCredential
|
||||
(
|
||||
uint32_t ssFlags, // IN
|
||||
SSCS_SECRET_ID_T * appSecretID, // IN
|
||||
SSCS_SECRET_ID_T * sharedSecretID, // Optional IN
|
||||
SSCS_EXT_T * ext // Reserved
|
||||
);
|
||||
|
||||
// end
|
||||
SSCS_EXTERN_LIBCALL(int32_t)
|
||||
miCASAIsSecretPersistent
|
||||
(
|
||||
uint32_t ssFlags,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_EXT_T *ext
|
||||
);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
23
include/micasa_types.h
Normal file
23
include/micasa_types.h
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
#ifndef _MICASA_TYPES_H_
|
||||
#define _MICASA_TYPES_H_
|
||||
|
||||
#if defined(N_PLAT_UNIX)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#else
|
||||
#include <stdio.h>
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed char int8_t;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
31
include/resource.h
Normal file
31
include/resource.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by dialog.rc
|
||||
//
|
||||
#define IDD_LOCAL_LOGIN 100
|
||||
#define IDC_USERNAME 101
|
||||
#define IDC_DOMAIN 102
|
||||
#define IDC_PASSWORD 103
|
||||
#define IDC_USERNAME_EDIT 104
|
||||
#define IDC_DOMAIN_EDIT 105
|
||||
#define IDC_DOMAIN_STATIC 105
|
||||
#define IDC_PASSWORD_EDIT 106
|
||||
#define IDC_BUTTON_OK 107
|
||||
#define IDC_BUTTON_CANCEL 108
|
||||
#define IDC_BUTTON_HELP 109
|
||||
#define IDS_HELP_MSG_HDR 110
|
||||
#define IDS_HELP_MSG 111
|
||||
#define IDB_BITMAP1 116
|
||||
#define IDC_PICTURE1 -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 117
|
||||
#define _APS_NEXT_COMMAND_VALUE 1000
|
||||
#define _APS_NEXT_CONTROL_VALUE 1102
|
||||
#define _APS_NEXT_SYMED_VALUE 1200
|
||||
#endif
|
||||
#endif
|
||||
46
include/ssbldver.h
Normal file
46
include/ssbldver.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// ***********************************************************
|
||||
// * This file is automatically generated by SecretStore Build
|
||||
// ***********************************************************
|
||||
#ifndef _SS_BLDVER_H_
|
||||
#define _SS_BLDVER_H_
|
||||
|
||||
|
||||
#define WSS_BLD_NO 1,0,0,1
|
||||
#define SSS_VERSION_NUMBER 0x00010000L
|
||||
#define WSS_BLD_STR "1.0.0.1.2"
|
||||
#define GSS_BLD_STR "1.0.0"
|
||||
#define NSS_BLD_STR "1.0.0.1.2"
|
||||
#define SSS_COPYRIGHT_STR "Copyright <20> 1998-2004 Novell, Inc."
|
||||
#define SSS_PATENT_STR "U.S. Patent No. 5,818,936, Second Patent Pending."
|
||||
#define SSS_WCLIENT_STRING "Novell SecretStore Client Service\r\nFor Win32 Operating Systems."
|
||||
#define SSS_COMPANY_STR "Novell, Inc."
|
||||
#define SSS_PRODUCT_STR "Novell SecretStore Client Service."
|
||||
#define SSS_DEVBLD_STR "Internal Development Build."
|
||||
#define SSS_DEBUG_VER_STR "Internal Debug Build."
|
||||
#define SSS_NSSGSS_STR "nssgss.dll"
|
||||
#define SSS_NSSGSS_STR_DBG "nssgss_mdd.dll"
|
||||
#define SSS_NSSGSS_PR_STRING "Novell SecretStore Client Service GSS Transport Plugin."
|
||||
#define SSS_NSSNCP_STR "nssncp.dll"
|
||||
#define SSS_NSSNCP_STR_DBG "nssncp_mdd.dll"
|
||||
#define SSS_NSSNCP_PR_STRING "Novell SecretStore Client Service NCP Transport Plugin."
|
||||
#define SSS_NSSLDP_STR "nssldp.dll"
|
||||
#define SSS_NSSLDP_STR_DBG "nssldp_mdd.dll"
|
||||
#define SSS_NSSLDP_PR_STRING "Novell SecretStore Client Service LDAP Trnasport Plugin."
|
||||
#define SSS_NSSSAML_STR "nsssaml.dll"
|
||||
#define SSS_NSSSAML_STR_DBG "nsssaml_mdd.dll"
|
||||
#define SSS_NSSSAML_PR_STRING "Novell SecretStore Client Service SAML Transport Plugin."
|
||||
#define SSS_NSSNMAS_STR "nssnmas.dll"
|
||||
#define SSS_NSSNMAS_STR_DBG "nsssnmas_mdd.dll"
|
||||
#define SSS_NSSNMAS_PR_STRING "Novell SecretStore Client Service NMAS Transport Plugin."
|
||||
#define SSS_NSSINITSYNC_STR "nssinitsync.dll"
|
||||
#define SSS_NSSINITSYNC_STR_DBG "nssinitsync.dll"
|
||||
#define SSS_NSSINITSYNC_PR_STRING "Novell SecretStore Client Service Initialization and Synchronization Engine."
|
||||
#define SSS_NSSINITSYNC_STR "nsssdk.dll"
|
||||
#define SSS_NSSINITSYNC_STR_DBG "nsssdk.dll"
|
||||
#define SSS_NSSINITSYNC_PR_STRING "Novell SecretStore Client Service SDK APIs."
|
||||
|
||||
|
||||
#endif /* _SS_BLDVER_H_ */
|
||||
|
||||
// ***********************************************************
|
||||
// ***********************************************************
|
||||
489
include/sscs_cache.h
Normal file
489
include/sscs_cache.h
Normal file
@@ -0,0 +1,489 @@
|
||||
/****************************************************************************
|
||||
%name: sscs_cache.h %
|
||||
%version: 10 %
|
||||
%date_modified: Thu May 12 13:16:31 2005 %
|
||||
****************************************************************************/
|
||||
#ifndef _SSCS_CACHE_H
|
||||
#define _SSCS_CACHE_H
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//#include <wchar.h>
|
||||
#include <sscs_sdk.h>
|
||||
#include <sscs_utf8.h>
|
||||
#include <micasa_types.h>
|
||||
#include <malloc.h>
|
||||
|
||||
/* Predefined Key Chains */
|
||||
/* SSCS_HIDDEN_LOCAL_KEY_CHAIN_F should not be used by the applications */
|
||||
#define SSCS_HIDDEN_LOCAL_KEY_CHAIN_F 0x00000001L
|
||||
/* Hidden local key chain is used only by sscs. Not visible to applications. */
|
||||
#define SSCS_SH_KC_ID (SSCS_SESSION_KEY_CHAIN_F | SSCS_HIDDEN_KEY_CHAIN_F)
|
||||
#if 0
|
||||
static wchar_t SSCS_HIDDEN_LOCAL_KEY_CHAIN_ID[] =
|
||||
{'S','S','C','C','S','_','H','I','D','D','E','N','_','L','O','C','A','L','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
|
||||
static wchar_t SSCS_RESERVED1_KEY_CHAIN_ID[] =
|
||||
{'S','S','C','C','S','_','R','E','S','E','R','V','E','D','1','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
|
||||
static wchar_t SSCS_RESERVED2_KEY_CHAIN_ID[] =
|
||||
{'S','S','C','C','S','_','R','E','S','E','R','V','E','D','2','_','K','E','Y','_','C','H','A','I','N','_','I','D', 0};
|
||||
#endif
|
||||
|
||||
static SS_UTF8_T SSCS_HIDDEN_LOCAL_KEY_CHAIN_ID[] = "SSCS_HIDDEN_LOCAL_KEYCHAIN_ID";
|
||||
|
||||
static SS_UTF8_T SSCS_RESERVED1_KEY_CHAIN_ID[] = "SSCS_RESERVED1_KEYCHAIN1_ID";
|
||||
static SS_UTF8_T SSCS_RESERVED2_KEY_CHAIN_ID[] = "SSCS_RESERVED2_KEYCHAIN2_ID";
|
||||
|
||||
//#define SSCS_WIN32_PLAT_F 1
|
||||
//#define SSCS_LINUX_PLAT_F 2
|
||||
|
||||
#define SSCS_PASSWORD_MP_F 1
|
||||
#define SSCS_CRED_MP_F 2
|
||||
|
||||
#define NSSCS_MAX_ID_LEN 256
|
||||
|
||||
typedef struct _sscs_linux_ss_handle
|
||||
{
|
||||
int32_t socketID;
|
||||
} SSCS_LINUX_SS_HANDLE_T;
|
||||
|
||||
typedef struct _sscs_win32_ss_handle
|
||||
{
|
||||
int32_t tobediceded;
|
||||
} SSCS_WIN32_SS_HANDLE_T;
|
||||
|
||||
typedef struct _sscs_secretstore_handle
|
||||
{
|
||||
int32_t platformID;
|
||||
void *platHandle;
|
||||
} SSCS_SECRETSTORE_HANDLE_T;
|
||||
|
||||
|
||||
typedef struct _sscs_keychain_info
|
||||
{
|
||||
uint32_t flags;
|
||||
uint32_t numSecrets;
|
||||
uint32_t numOfHiddenSecrets;
|
||||
uint32_t numOfDeletedSecs;
|
||||
uint32_t enumBufsize;
|
||||
SSCS_KEYCHAIN_ID_T keyChainID;
|
||||
} SSCS_KEYCHAIN_INFO_T;
|
||||
|
||||
// * Secret Data type
|
||||
typedef struct _sscs_secret
|
||||
{
|
||||
int32_t len;
|
||||
uint8_t *data;
|
||||
} SSCS_SECRET_T;
|
||||
|
||||
typedef struct _sscs_context_t
|
||||
{
|
||||
int32_t version;
|
||||
int32_t flags;
|
||||
SSCS_SECRETSTORE_T ssid;
|
||||
void *ssHandle;
|
||||
SSCS_KEYCHAIN_ID_LIST_T *kcids;
|
||||
} SSCS_CONTEXT_T;
|
||||
|
||||
|
||||
|
||||
/* Starts a session with the cache and returns a handle to the cache.
|
||||
* Parametrs:
|
||||
* secretStoreID
|
||||
* (IN) Points to SecretStoreID structure.
|
||||
*
|
||||
* Return Values:
|
||||
* returns a pointer to SecretStoreHandle structure.
|
||||
*/
|
||||
void* sscs_CacheOpenSecretStore
|
||||
(
|
||||
void *secretStoreID,
|
||||
uint32_t ssFlags,
|
||||
void *reserved
|
||||
|
||||
);
|
||||
|
||||
/* Closes the secretstore and destroys the SecretStore context for that
|
||||
* application.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
*
|
||||
* Return Values
|
||||
*
|
||||
*/
|
||||
int sscs_CacheCloseSecretStore
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Removes all application defined keychains from the store. It also removes
|
||||
* secrets stored in system defined keychains.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheRemoveSecretStore
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Enumerates key chain ids available in the store.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
*
|
||||
* kcIDList
|
||||
* (OUT) Points to the key chain id enumeration structure. Points to
|
||||
* KeyChainIDList structure.
|
||||
*
|
||||
*
|
||||
* Return Values:
|
||||
*
|
||||
*/
|
||||
int sscs_CacheEnumerateKeychainIDs
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SRCH_KEY_T *searchKey,
|
||||
SSCS_KEYCHAIN_ID_LIST_T *kcIDList,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Creates a new keychain in the store.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
* ssFlags
|
||||
* (IN) Can be a combination of following flags:
|
||||
* SSCS_SESSION_KEY_CHAIN_F
|
||||
* SSCS_LOCAL_KEY_CHAIN_F
|
||||
* SSCS_REMOTE_KEY_CHAIN_F
|
||||
* keychainID
|
||||
* (IN) Specifies the unique keychain ID within the secretstore.
|
||||
*
|
||||
*/
|
||||
int sscs_CacheAddKeychain
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
|
||||
/* Removes the specified keychain from the store.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
* keychainID
|
||||
* (IN) Specifies the unique keychain ID within the secretstore.
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheRemoveKeychain
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Enumerates secret ids in a given keychain.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
* keyChainID
|
||||
* (IN) handle obtained during sscs_CacheOpenKeychain.
|
||||
*
|
||||
*
|
||||
* secretIDList
|
||||
* (OUT) Points to the secret id enumeration structure. Points to
|
||||
* SecretIDList structure.
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheEnumerateSecretIDs
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SRCH_KEY_T *searchKey,
|
||||
SSCS_SECRET_ID_LIST_T *secretIDList,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
|
||||
/* Reads Secret value for a given Secret ID in a given keychain.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
* keyChainID
|
||||
* (IN) KeyChainID where the specified SecretID stored.
|
||||
*
|
||||
* secretID
|
||||
* (IN) Specifies the unique secret ID within the keychain. This data is
|
||||
* encoded in SSCS_SECRET_ID_T.
|
||||
*
|
||||
* secretData
|
||||
* (IN/OUT) Specifies the information of the secret stored w.r.t the secretID.
|
||||
* Points to a SSCS_SECRET_T structure.
|
||||
*
|
||||
* epPassword
|
||||
* (IN) Points to an optional field to pass in the Enhanced Protection Password
|
||||
* for reading a secret.When the password is not present, you can pass in a NULL.
|
||||
*
|
||||
* bytesRequired
|
||||
* (OUT) Specifies the buffer requirement if it is not possible
|
||||
* to copy Secret data in the buffer passed by the application.
|
||||
|
||||
*
|
||||
* Return Values :
|
||||
*/
|
||||
int sscs_CacheReadSecret
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_SECRET_T *secretData,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
uint32_t *bytesRequired,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
|
||||
/* Writes Secret value for a given Secret ID in a given keychain.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
* ssFlags
|
||||
* (IN) ...
|
||||
*
|
||||
* keyChainID
|
||||
* (IN) KeyChainID where the specified SecretID stored.
|
||||
*
|
||||
* secretID
|
||||
* (IN) Specifies the unique secret ID within the keychain. This data is
|
||||
* encoded in SSCS_SECRET_ID_T.
|
||||
*
|
||||
* secretData
|
||||
* (IN) Specifies the information of the secret stored w.r.t the secretID.
|
||||
* Points to a SSCS_SECRET_T structure.
|
||||
*
|
||||
*
|
||||
* epPassword
|
||||
* (IN) Points to an optional field to pass in the Enhanced Protection Password
|
||||
* for reading a secret.When the password is not present, you can pass in a NULL.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheWriteSecret
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_SECRET_T *secretData,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
|
||||
/* Removes Secret for a given Secret ID in a given keychain.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context information regarding the SecretStore.
|
||||
*
|
||||
*
|
||||
* keyChainID
|
||||
* (IN) KeyChainID where the specified SecretID stored.
|
||||
*
|
||||
* secretID
|
||||
* (IN) Specifies the unique secret ID within the keychain. This data is
|
||||
* encoded in SSCS_SECRET_ID_T.
|
||||
*
|
||||
*
|
||||
* epPassword
|
||||
* (IN) Points to an optional field to pass in the Enhanced Protection Password
|
||||
* for reading a secret.When the password is not present, you can pass in a NULL.
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheRemoveSecret
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Returns statistical information regarding the SecretStore and its Keychains.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context with respect to the instance of open cache in it.
|
||||
*
|
||||
*
|
||||
* ssInfo
|
||||
* (OUT) This structure contains the statistical information regarding the
|
||||
* SecretStore and its Keychains.
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheGetSecretStoreInfo
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_SECRETSTORE_INFO_T *ssInfo,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* Retrieves the statistical information regarding the target Keychain.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context with respect to the instance of open cache in it.
|
||||
*
|
||||
* keyChainID
|
||||
* (IN) KeyChainID where the specified SecretID stored.
|
||||
*
|
||||
*
|
||||
* kcInfo
|
||||
* (OUT) This structure contains the statistical information regarding the
|
||||
* Keychain.
|
||||
*
|
||||
*
|
||||
* Return Values:
|
||||
*/
|
||||
int sscs_CacheGetKeychainInfo
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_KEYCHAIN_INFO_T *kcInfo,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* This call locks that cache to prevent access until the MasterPassword is
|
||||
* supplied.
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context with respect to the instance of open cache in it.
|
||||
*
|
||||
* Return Values :
|
||||
*/
|
||||
int sscs_LockCache
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
/* This unlocks previously locked cache using the MasterPassword
|
||||
*
|
||||
* Parameters:
|
||||
* ssHandle
|
||||
* (IN) Handle returned by sscs_CacheOpenSecretStore function. This will have
|
||||
* context with respect to the instance of open cache in it.
|
||||
* masterPassword
|
||||
*
|
||||
* Return Values :
|
||||
*/
|
||||
int sscs_UnlockCache
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_PASSCODE_T *passcode,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
int sscs_CacheWriteKey
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t keyLen,
|
||||
uint8_t *val,
|
||||
uint32_t valLen,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
int32_t sscs_SetMasterPasscode
|
||||
(
|
||||
void *ssHandle,
|
||||
SSCS_PASSCODE_T *passcode,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
int32_t sscs_SetMasterPassword
|
||||
(
|
||||
void *ssHandle,
|
||||
SSCS_PASSWORD_T *password,
|
||||
SSCS_HINT_T *hint,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
int sscs_IsSecretPersistent
|
||||
(
|
||||
void *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
void *reserved
|
||||
);
|
||||
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SSCS_CACHE_H */
|
||||
193
include/sscs_ipc.h
Normal file
193
include/sscs_ipc.h
Normal file
@@ -0,0 +1,193 @@
|
||||
#ifndef _SSCS_IPC_H
|
||||
#define _SSCS_IPC_H
|
||||
#include <micasa_types.h>
|
||||
|
||||
typedef uint8_t Byte;
|
||||
#define MAX_SOCKET_PATH_LEN 256
|
||||
#ifdef DEBUG
|
||||
#define DMSG(x) printf x
|
||||
#else
|
||||
#define DMSG(x)
|
||||
#endif
|
||||
// Used for global buffers.
|
||||
#define MIN_REQUEST_BUF_LEN 1024
|
||||
#define MIN_REPLY_BUF_LEN 4096
|
||||
|
||||
#ifdef SSCS_LINUX_PLAT_F
|
||||
#include "sscs_unx_ipc_client.h"
|
||||
#include "sscs_unx_cache_defines.h"
|
||||
#include <sscs_lldefs.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define IPC_CREATE(...) ipc_unx_create(__VA_ARGS__);
|
||||
#define IPC_READ(...) ipc_unx_read(__VA_ARGS__);
|
||||
#define IPC_WRITE(...) ipc_unx_write(__VA_ARGS__);
|
||||
#define IPC_CLOSE(...) ipc_unx_close(__VA_ARGS__);
|
||||
|
||||
#else
|
||||
|
||||
//#ifdef SSCS_WIN32_PLAT_F
|
||||
|
||||
#include <windows.h>
|
||||
#include "sscs_unx_ipc_client.h"
|
||||
#include "sscs_unx_cache_defines.h"
|
||||
#include <sscs_lldefs.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define IPC_CREATE() ipc_win_create();
|
||||
#define IPC_READ(s1,s2,s3) ipc_win_read(s1,s2,s3);
|
||||
#define IPC_WRITE(s1,s2,s3) ipc_win_write(s1,s2,s3);
|
||||
#define IPC_CLOSE(s1) ipc_win_close(s1);
|
||||
|
||||
//#endif
|
||||
|
||||
// function prototypes
|
||||
int ipc_OpenSecretStore
|
||||
(
|
||||
void *secretStoreID,
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle
|
||||
);
|
||||
|
||||
int ipc_CloseSecretStore
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
uint32_t ssFlags
|
||||
);
|
||||
|
||||
int ipc_RemoveSecretStore
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle
|
||||
);
|
||||
|
||||
int ipc_EnumerateKeychainIDs
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_LIST_T *kcIDList
|
||||
);
|
||||
|
||||
int ipc_AddKeychain
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
unsigned int ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID
|
||||
);
|
||||
|
||||
int ipc_RemoveKeychain
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID
|
||||
);
|
||||
|
||||
int ipc_EnumerateSecretIDs
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_LIST_T *secretIDList
|
||||
);
|
||||
|
||||
int ipc_ReadSecret
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_SECRET_T *secretData,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
unsigned int *bytesRequired
|
||||
);
|
||||
|
||||
int ipc_WriteSecret
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
unsigned int ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_SECRET_T *secretData,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
SSCS_EXT_T *ext
|
||||
);
|
||||
|
||||
int ipc_RemoveSecret
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_PASSWORD_T *epPassword
|
||||
);
|
||||
|
||||
int ipc_GetSecretStoreInfo
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_SECRETSTORE_INFO_T *ssInfo
|
||||
);
|
||||
|
||||
int ipc_GetKeychainInfo
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_KEYCHAIN_INFO_T *kcInfo
|
||||
);
|
||||
|
||||
int ipc_LockCache
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle
|
||||
);
|
||||
|
||||
int ipc_UnlockCache
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_PASSCODE_T *passcode
|
||||
);
|
||||
|
||||
int ipc_SetMasterPasscode
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_PASSCODE_T *passcode
|
||||
);
|
||||
|
||||
int ipc_ReadKey
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t keyLen,
|
||||
uint8_t *val,
|
||||
uint32_t valLen,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
uint32_t *bytesRequired
|
||||
);
|
||||
|
||||
int ipc_WriteKey
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SS_UTF8_T *key,
|
||||
uint32_t keyLen,
|
||||
uint8_t *val,
|
||||
uint32_t valLen,
|
||||
SSCS_PASSWORD_T *epPassword,
|
||||
SSCS_EXT_T *ext
|
||||
);
|
||||
|
||||
int32_t ipc_SetMasterPassword
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
SSCS_PASSWORD_T *passwd,
|
||||
SSCS_HINT_T *hint
|
||||
);
|
||||
|
||||
int ipc_IsSecretPersistent
|
||||
(
|
||||
SSCS_SECRETSTORE_HANDLE_T *ssHandle,
|
||||
uint32_t ssFlags,
|
||||
SSCS_KEYCHAIN_ID_T *keychainID,
|
||||
SSCS_SECRET_ID_T *secretID,
|
||||
SSCS_EXT_T *ext
|
||||
);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
97
include/sscs_lldefs.h
Normal file
97
include/sscs_lldefs.h
Normal file
@@ -0,0 +1,97 @@
|
||||
/**************************************************************************
|
||||
* %name: sscs_lldefs.h %
|
||||
* %version: 5 %
|
||||
* %date_modified: Thu May 12 13:17:33 2005 %
|
||||
***************************************************************************
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifndef _SSCSLLDEFS__H
|
||||
#define _SSCSLLDEFS__H
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "sscs_utf8.h"
|
||||
#include "micasa_types.h"
|
||||
|
||||
/* ############################## ERROR CODES ############################ */
|
||||
|
||||
#define NSSCS_LL_SUCCESS 0x00000000 /* 0 */
|
||||
#define NSSCS_E_LL_SYS_FAILURE 0xFFFFFCDD /* -803 */
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
/* ######################## STRUCTURE DEFINITIONS ######################### */
|
||||
|
||||
typedef struct _ll_link
|
||||
{
|
||||
struct _ll_link *next; /* next in the list */
|
||||
void *item;
|
||||
} LL_LINK_T;
|
||||
|
||||
/* this is the link list information structure */
|
||||
typedef struct _link_lst
|
||||
{
|
||||
uint32_t elemCount; /* number of links in the list */
|
||||
LL_LINK_T *head; /* real head of the link list (for caching & GC)*/
|
||||
LL_LINK_T *clp; /* current link pointer */
|
||||
} LL_LINKLIST_T;
|
||||
|
||||
|
||||
typedef struct _shared_secret_key_val
|
||||
{
|
||||
uint32_t kLen;
|
||||
SS_UTF8_T *key;
|
||||
uint32_t vLen;
|
||||
uint8_t *value;
|
||||
} LL_SHSEC_KEY_VAL_T;
|
||||
|
||||
|
||||
int ll_InsertSharedSecretLink
|
||||
(
|
||||
LL_LINKLIST_T * list,
|
||||
uint32_t kLen, //in bytes
|
||||
SS_UTF8_T * key,
|
||||
uint32_t vLen, // in bytes
|
||||
uint8_t * value
|
||||
);
|
||||
|
||||
int ll_RemoveSharedSecretLink
|
||||
(
|
||||
LL_LINKLIST_T * list,
|
||||
uint32_t kLen,
|
||||
SS_UTF8_T * key
|
||||
);
|
||||
|
||||
#define ll_GetSHSecItem(list) ((LL_SHSEC_KEY_VAL_T *)(list)->clp->item)
|
||||
#define ll_GetSHSecKey(list) (((LL_SHSEC_KEY_VAL_T *)(list)->clp->item)->key)
|
||||
#define ll_GetSHSecKeyLen(list) (((LL_SHSEC_KEY_VAL_T *)(list)->clp->item)->kLen)
|
||||
#define ll_GetSHSecVal(list) (((LL_SHSEC_KEY_VAL_T *)(list)->clp->item)->value)
|
||||
#define ll_GetSHSecValLen(list) (((LL_SHSEC_KEY_VAL_T *)(list)->clp->item)->vLen)
|
||||
|
||||
#define ll_Head(list) {(list)->clp = (list)->head;}
|
||||
#define ll_IsListPopulated(list) ((list)->elemCount)
|
||||
#define ll_GetElemCount(list) ((list)->elemCount)
|
||||
#define ll_GetItemPtr(list); (((list)->elemCount) ? ((list)->clp->item) : NULL)
|
||||
|
||||
|
||||
void ll_DestroyList(LL_LINKLIST_T *list);
|
||||
int ll_Next(LL_LINKLIST_T *list);
|
||||
void* ll_GetEntry(LL_LINKLIST_T *list);
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SSCSLLDEFS__H */
|
||||
|
||||
50
include/sscs_sdk.h
Normal file
50
include/sscs_sdk.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/**************************************************************************
|
||||
* %name: sscs_sdk.h %
|
||||
* %instance: security_1 %
|
||||
* %version: 11 %
|
||||
* %created_by: cameron %
|
||||
* %date_modified: Tue May 03 10:33:35 2005 %
|
||||
***************************************************************************
|
||||
*
|
||||
**************************************************************************/
|
||||
#ifndef _SSCS_SDK_H_
|
||||
#define _SSCS_SDK_H_
|
||||
|
||||
/* This is the NDK header file for the SecretStore version 3.02. */
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <sscs_utf8.h>
|
||||
#include <micasa.h>
|
||||
|
||||
#define SSCS_BINARY_TYPE_F 0x00000004L
|
||||
#define SSCS_OBITUARY_TYPE_F 0x00000008L
|
||||
|
||||
static SS_UTF8_T SSCS_OBITUARY[] = {"SS_Obituary"};
|
||||
// {'S','S','_','O','b','i','t','u','a','r','y', 0};
|
||||
// #define SSCS_OBITUARY_LEN 24
|
||||
#define SSCS_OBITUARY_CHARS 11
|
||||
|
||||
// this is not exposed outside of SSCS because its only here for backward compatibility
|
||||
static SS_UTF8_T SSCS_APP_SECRET[] = {"SS_App"};
|
||||
//{'S','S','_','A','p','p', 0};
|
||||
// #define SSCS_APP_SECRET_LEN 14
|
||||
#define SSCS_APP_SECRET_CHARS 6
|
||||
|
||||
|
||||
//* This is used with cache because cache is aware of shared secret format
|
||||
typedef struct _sscs_secret_ID_List
|
||||
{
|
||||
uint32_t enumHandle; // set to 0 to begin with
|
||||
uint32_t returnedIDs; // to be initialized by the caller to the array size
|
||||
SSCS_SECRET_ID_T *secIDList; //* an array of secret IDs structures.
|
||||
} SSCS_SECRET_ID_LIST_T;
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SSCS_SDK_H */
|
||||
37
include/sscs_string.h
Normal file
37
include/sscs_string.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/****************************************************************************
|
||||
%name: sscs_string.h %
|
||||
%version: 1 %
|
||||
%date_modified: Wed Mar 09 11:16:19 2005 %
|
||||
%version: 1 %
|
||||
%date_modified: Wed Mar 09 11:16:19 2005 %
|
||||
*
|
||||
****************************************************************************
|
||||
* This is the source file for the SecretStore server string functions.
|
||||
****************************************************************************/
|
||||
#ifndef _SSCS_STRING_H_
|
||||
#define _SSCS_STINRG_H_
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define sscs_strcmp strcmp
|
||||
#define sscs_strcpy strcpy
|
||||
#define sscs_strcat strcat
|
||||
#define sscs_strchr strchr
|
||||
#define sscs_strlen strlen
|
||||
#define sscs_strstr strstr
|
||||
#define sscs_strncat strncat
|
||||
#define sscs_strncmp strncmp
|
||||
#define sscs_strncpy strncpy
|
||||
|
||||
#ifdef N_PLAT_UNIX
|
||||
|
||||
#define sscs_stricmp stricmp
|
||||
|
||||
#else
|
||||
|
||||
#define sscs_stricmp _stricmp
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* SSCS_STRING_H */
|
||||
|
||||
980
include/sscs_trans.h
Normal file
980
include/sscs_trans.h
Normal file
@@ -0,0 +1,980 @@
|
||||
/**************************************************************************
|
||||
* %name: sscs_trans.h %
|
||||
* %instance: security_1 %
|
||||
* %version: 1 %
|
||||
* %created_by: cameron %
|
||||
* %date_modified: Tue Sep 28 16:15:24 2004 %
|
||||
***************************************************************************
|
||||
*
|
||||
* Copyright (c) 1998-2003 Novell, Inc. All rights reserved.
|
||||
*
|
||||
* THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
|
||||
* USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE LICENSE AGREEMENT
|
||||
* ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT (SDK) THAT CONTAINS THIS WORK.
|
||||
* PURSUANT TO THE SDK LICENSE AGREEMENT, NOVELL HEREBY GRANTS TO DEVELOPER A
|
||||
* ROYALTY-FREE, NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL'S SAMPLE CODE IN ITS
|
||||
* PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS TO MARKET,
|
||||
* DISTRIBUTE, OR SELL NOVELL'S SAMPLE CODE AS A COMPONENT OF DEVELOPER'S
|
||||
* PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO DEVELOPER OR DEVELOPER'S
|
||||
* CUSTOMERS WITH RESPECT TO THIS CODE.
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef _NSSSCL_H_
|
||||
#define _NSSSCL_H_
|
||||
|
||||
/* This is the NDK header file for the SecretStore version 3.02. */
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#ifndef _SSPROTO_H_
|
||||
#define _SSPROTO_H_
|
||||
#if defined(WIN32)
|
||||
|
||||
#define SS_GLOBAL_LIBCALL_PTR(RET) RET * __stdcall
|
||||
#define SS_GLOBAL_LIBCALL(RET) RET __stdcall
|
||||
#define SS_EXTERN_LIBCALL_PTR(RET) extern RET * __stdcall
|
||||
#define SS_EXTERN_LIBCALL(RET) extern RET __stdcall
|
||||
#define SS_TYPEDEF_LIBCALL_PTR(RET, PTR) typedef RET * (__stdcall *PTR)
|
||||
#define SS_TYPEDEF_LIBCALL(RET, PTR) typedef RET (__stdcall *PTR)
|
||||
|
||||
#else
|
||||
|
||||
#define SS_GLOBAL_LIBCALL_PTR(RET) RET *
|
||||
#define SS_GLOBAL_LIBCALL(RET) RET
|
||||
#define SS_EXTERN_LIBCALL_PTR(RET) extern RET *
|
||||
#define SS_EXTERN_LIBCALL(RET) extern RET
|
||||
#define SS_TYPEDEF_LIBCALL_PTR(RET, PTR) typedef RET * (*PTR)
|
||||
#define SS_TYPEDEF_LIBCALL(RET, PTR) typedef RET (*PTR)
|
||||
|
||||
#endif
|
||||
|
||||
#endif //* _SSPROTO_H_
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ####################### SecretStore Constants ############################# */
|
||||
/* ########################################################################### */
|
||||
|
||||
|
||||
#ifndef _SSSHAR_H
|
||||
|
||||
#define NSSS_VERSION_NUMBER 0x00030200L //* client version number
|
||||
|
||||
#define NSSS_MAX_KEYCHAIN_ID_CHARS 256 //* double bytes including NULL
|
||||
#define NSSS_MAX_KEYCHAIN_ID_LEN 512 //* in bytes including NULL
|
||||
|
||||
|
||||
|
||||
#define NSSS_MAX_SECRET_ID_CHARS 256 //* double bytes including NULL
|
||||
#define NSSS_MAX_SECRET_ID_LEN 512 //* in bytes including NULL
|
||||
|
||||
#define NSSS_MIN_SECRET_BUF_LEN 3968 //* (4K-128)to match server
|
||||
#define NSSS_MID_SECRET_BUF_LEN 32768 //* (4K-128)to match server
|
||||
#define NSSS_MAX_SECRET_BUF_LEN 60416 //* (59K)to match server
|
||||
#define NSSS_MAX_EP_PWORD_CHARS 64 //* enhanced protection max password (chars)
|
||||
#define NSSS_MAX_EP_PWORD_LEN 128 //* enhanced protection max password (bytes)
|
||||
|
||||
#define NSSS_MAX_LDAP_PWORD_LEN 128 //* user's ldap login password
|
||||
|
||||
#define NSSS_MAX_MP_PWORD_HINT_CHARS 64 //* enhanced protection max hint (chars)
|
||||
#define NSSS_MAX_MP_PWORD_HINT_LEN 128 //* enhanced protection maximum hint (bytes)
|
||||
|
||||
#define NSSS_MAX_TREE_NAME_CHARS 32 //* max tree name length (chars)
|
||||
#define NSSS_MAX_TREE_NAME_LEN 64 //* max tree name length (bytes)
|
||||
|
||||
#define NSSS_MAX_DN_CHARS 258 //* max DN length (chars)
|
||||
#define NSSS_MAX_DN_LEN 516 //* max DN length (bytes)
|
||||
|
||||
#define NSSS_MAX_IP_ADDR_LEN 16 //* IP address string length (bytes including NULL)
|
||||
#define NSSS_MAX_ADDR_LEN 512 //* can be IP or DNS name (bytes including null)
|
||||
|
||||
#define NSSS_NICI_UNDETERMINED_ENGINE 0
|
||||
#define NSSS_NICI_DOMESTIC_ENGINE 1
|
||||
#define NSSS_NICI_EXPORT_ENGINE 2
|
||||
|
||||
#define NSSS_MIN_IDLIST_BUF_LEN 16384 //* (16K)
|
||||
#define NSSS_MID_IDLIST_BUF_LEN 32768 //* (32K)
|
||||
#define NSSS_MAX_IDLIST_BUF_LEN 65536 //* (64kK)
|
||||
#define NSSS_JUMBO_IDLIST_BUF_LEN 131072 //* (128K)
|
||||
#define NSSS_JUMBO_ENUM_BUF_LEN 131072 //* (128K)
|
||||
#define NSSS_ENUM_BUFFER_GUESS 32768 //* (32K)
|
||||
|
||||
#define NSSS_MAX_LDAP_CRED_BUF_LEN 65536 //* (64kK)
|
||||
|
||||
#define NSSS_ENUM_DELIM "*" //* immutable
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ############################### API FLAGS ################################# */
|
||||
/* ########################################################################### */
|
||||
|
||||
/* input only flag for Unlock API
|
||||
============================== */
|
||||
/* can delete locked secrets from store to remove lock */
|
||||
#define NSSS_REMOVE_LOCK_FROM_STORE_F 0x00000004L
|
||||
/* if the store is not locked return an error otherwise use the info supplied
|
||||
to unlock the store. In the absense of this flag when the store is not
|
||||
locked the SecretStore returns success. */
|
||||
#define NSSS_IS_STORE_LOCKED_F 0x00000008L
|
||||
|
||||
|
||||
/* input only flags for Write API
|
||||
============================== */
|
||||
/* Enhanced Protection indicator flag for Read & Write */
|
||||
#define NSSS_ENHANCED_PROTECTION_F 0x00000001L
|
||||
/* Enhanced Protection optional password indicator flag for Read & Write */
|
||||
#define NSSS_EP_PASSWORD_USED_F 0x00000040L
|
||||
/* if Secret ID is in the SecretStore already don't overwrite the secret */
|
||||
#define NSSS_CHK_SID_FOR_COLISION_F 0x00004000L
|
||||
|
||||
/* input only flag for Read API
|
||||
============================ */
|
||||
/* request all possible repair on damaged store */
|
||||
#define NSSS_REPAIR_THE_STORE_F 0x00000008L
|
||||
|
||||
/* input only flag for all the APIs
|
||||
================================ */
|
||||
//* This flag tells the call that the strings such as
|
||||
//* secretID, DN, searchString etc. are already converted
|
||||
//* to Unicode and no conversion is necessary, results
|
||||
//* like secretIDList will be returned in unicode.
|
||||
#define NSSS_ALL_STRINGS_UNICODE_F 0x00000010L
|
||||
#define NSSS_SET_TREE_NAME_F 0x00000080L
|
||||
//* Internally destroys the DS context passed in
|
||||
#define NSSS_DESTROY_CONTEXT_F 0x00000200L
|
||||
#define NSSS_UNBINDLDAP_F 0x00001000L
|
||||
|
||||
/* input only flag for GetServiceInformation API
|
||||
============================================= */
|
||||
//* will return a DS context for reuse in the subsequent calls
|
||||
#define NSSS_GET_CONTEXT_F 0x00000100L
|
||||
|
||||
|
||||
|
||||
/* input flag for all APIs
|
||||
======================= */
|
||||
//* this flag indicates LDAP based acess to the directory is desired
|
||||
#define NSSS_BINDLDAP_F 0x00000800L
|
||||
|
||||
/* output only flags from Read API (statFlags on reading a secret)
|
||||
also these come back on GetServiceInformation (statFlags on the store)
|
||||
==================================================================== */
|
||||
/* Non-Repudiation lock on secret */
|
||||
#define NSSS_SECRET_LOCKED_F 0x00010000L
|
||||
/* Secret not initialized with a Write yet */
|
||||
#define NSSS_SECRET_NOT_INITIALIZED_F 0x00020000L
|
||||
/* Secret is marked for Enhanced Protection */
|
||||
#define NSSS_ENHANCED_PROTECT_INFO_F 0x00040000L
|
||||
/* Store not synchronized across replicas */
|
||||
#define NSSS_STORE_NOT_SYNCED_F 0x00080000L
|
||||
/* There is EP password on the secret */
|
||||
#define NSSS_EP_PWORD_PRESENT_F 0x00200000L
|
||||
|
||||
/* input only flag for Read, Unlock, and SetMP APIs
|
||||
================================================ */
|
||||
#define NSSS_EP_MASTER_PWORD_USED_F 0x00000020L
|
||||
|
||||
/* output only flags from Read API (statFlags on reading asecret
|
||||
============================================================= */
|
||||
/* Last secret modification by admin */
|
||||
#define NSSS_ADMIN_LAST_MOD_F 0x00100000L
|
||||
|
||||
|
||||
/* output only flag from GetServiceInformation API statFlags
|
||||
========================================================= */
|
||||
/* There is master password on the secretstore */
|
||||
#define NSSS_EP_MASTER_PWORD_PRESENT_F 0x00400000L
|
||||
|
||||
/* output only flag from GetServiceInformation, and read API statFlags
|
||||
=================================================================== */
|
||||
#define NSSS_MP_NOT_ALLOWED_F 0x00800000L
|
||||
|
||||
/* internal flag to the server
|
||||
=========================== */
|
||||
#define NSSS_SYNC_IN_PROGRESS_F 0x02000000L
|
||||
|
||||
/* output only flag for last Admin that has unlocked the store
|
||||
=========================================================== */
|
||||
#define NSSS_ADMIN_UNLOCKED_F 0x04000000L
|
||||
|
||||
/* output only flag for server internal features
|
||||
============================================ */
|
||||
#define NSSS_LATSTAMP_ALLOWED_F 0x08000000L /* ss last access time stamp allowed */
|
||||
#define NSSS_ADMIN_AUTHORIZED_F 0x10000000L /* ss admin authorized */
|
||||
|
||||
/* output only flag to indicate SecretStore contains hidden secrets
|
||||
================================================================ */
|
||||
#define NSSS_HIDDEN_SECRET_F 0x20000000L
|
||||
|
||||
|
||||
#define NSSSRemoveSecretID NSSSRemoveSecret
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ###################### CURRENT CONTEXT VERSION ############################ */
|
||||
/* ########################################################################### */
|
||||
#define NSSS_CUR_CTX_VERSION 0x00000001L
|
||||
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ############################ CONTEXT FLAGS ################################ */
|
||||
/* ########################################################################### */
|
||||
/* context flags for the type of context passed in or to initialize (can only use one.)
|
||||
=================================================================================== */
|
||||
#define NSSS_NCP_CTX_F 0x00000001L //* Context is for NCP
|
||||
#define NSSS_LDAP_CTX_F 0x00000002L //* Context is for LDAP
|
||||
#define NSSS_CONTEXT_INITIALIZED_F 0x00000004L //* Context already initialized
|
||||
#define NSSS_INIT_LDAP_SS_HANDLE_F 0x00000008L //* Init handle struct without bind
|
||||
#define NSSS_DEINIT_LDAP_SS_HANDLE_F 0x00000010L //* Deinit handle struct without unbind
|
||||
#define NSSS_REINIT_TARGET_DN_F 0x00000020L //* Reinit the target DN in the context
|
||||
#define NSSS_LDAP_CONTEXT_LESS_DN_F 0x00000040L //* Resolve LDAP DN as contextless
|
||||
#define NSSS_ADV_BIND_INFO_F 0x00000080L //* Use advanced bind structure
|
||||
//* and perform service location
|
||||
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ################# CURRENT ADVANCED BIND INFO VERSION ###################### */
|
||||
/* ########################################################################### */
|
||||
#define NSSS_CUR_ADV_BIND_INFO_VER 0x00000000L
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ########################## ADVANCED BIND INFO FLAGS ####################### */
|
||||
/* ########################################################################### */
|
||||
//* indicates that password struct is supplied for credential to bind
|
||||
#define NSSS_PWORD_CRED_F 0x00000001L
|
||||
|
||||
//* this flags allows the caller to override the default anonymous port 389 for
|
||||
//* service location and contextless name resolution in advance bind
|
||||
#define NSSS_SET_ANON_PORT_F 0x00000002L
|
||||
|
||||
|
||||
|
||||
/* ########################################################################### */
|
||||
/* ########################### STRUCTURE DEFINITIONS ######################### */
|
||||
/* ########################################################################### */
|
||||
|
||||
//********************************* NOTE ****************************************
|
||||
//* All of the character arrays in the structures have the max length in bytes
|
||||
//* but apps should pass in strings with the number of chars that is half the
|
||||
//* length of these char arrays. These arrays are double the size in length
|
||||
//* for unicode strings. (Reference the length in chars for each above.)
|
||||
//********************************* NOTE ****************************************
|
||||
|
||||
//* Secret ID type
|
||||
typedef struct _ss_secret_id
|
||||
{
|
||||
long len; //* max id len in bytes
|
||||
char id[NSSS_MAX_SECRET_ID_LEN]; //* should be passed in # of chars
|
||||
} SS_SECRET_ID_T;
|
||||
|
||||
//* Secret Data type
|
||||
typedef struct _ss_secret
|
||||
{
|
||||
long len;
|
||||
char *data;
|
||||
} SS_SECRET_T;
|
||||
|
||||
|
||||
//* Service location information. Each API-specific extension structures point to a
|
||||
//* SS_SERVER_INFO_T structure.
|
||||
typedef struct _ss_server_info
|
||||
{
|
||||
char treeName[NSSS_MAX_TREE_NAME_LEN];
|
||||
char ssServerDN[NSSS_MAX_DN_LEN];
|
||||
char ssServerIPAddr[NSSS_MAX_IP_ADDR_LEN];
|
||||
char sssConfigDN[NSSS_MAX_DN_LEN];
|
||||
} SS_SERVER_INFO_T;
|
||||
|
||||
//* new version big enough for unicode IP or DNS address
|
||||
typedef struct _ss_userver_info
|
||||
{
|
||||
char treeName[NSSS_MAX_TREE_NAME_LEN];
|
||||
char ssServerDN[NSSS_MAX_DN_LEN];
|
||||
char ssServerIPAddr[NSSS_MAX_ADDR_LEN];
|
||||
char sssConfigDN[NSSS_MAX_DN_LEN];
|
||||
} SS_USERVER_INFO_T;
|
||||
|
||||
typedef struct _ss_advanced_credential
|
||||
{
|
||||
unsigned long len;
|
||||
void *data;
|
||||
} SS_ADV_CRED_T, SS_CERT_T;
|
||||
|
||||
|
||||
typedef struct _ss_address
|
||||
{
|
||||
long len;
|
||||
char addr[NSSS_MAX_ADDR_LEN];
|
||||
} SS_ADDR_T;
|
||||
|
||||
|
||||
typedef struct _ss_advanced_bind_info
|
||||
{
|
||||
unsigned long version; //* ldap bind structure version
|
||||
unsigned long flags; //* ldap bind structure applicable flags
|
||||
unsigned long portNum;
|
||||
SS_ADDR_T hName; //* ip address (DNS name) of a servrer in the tree
|
||||
SS_CERT_T cert; //* server certificate obtained and used internally
|
||||
SS_ADV_CRED_T *cred; //* password (struct defined above), adv cred for future
|
||||
} SS_ADV_BIND_INFO_T;
|
||||
|
||||
|
||||
typedef struct _ss_ldap_bind_info
|
||||
{
|
||||
unsigned long portNum; //* default: 636
|
||||
char lHostName[ NSSS_MAX_DN_LEN ]; //* Ex: "nsd10.novell.com" or ip addr
|
||||
char trustedRootCert[ NSSS_MAX_DN_LEN ]; //* default: "c:\TrustedRootCertificate.der"
|
||||
char loginPword[ NSSS_MAX_LDAP_PWORD_LEN ]; //* LDAP login password (utf8)
|
||||
} SS_LDAPBIND_INFO_T;
|
||||
|
||||
typedef struct _ss_obj_id
|
||||
{
|
||||
long len;
|
||||
char id[NSSS_MAX_DN_LEN];
|
||||
} SS_OBJECT_DN_T;
|
||||
|
||||
|
||||
//* password structure
|
||||
typedef struct _ss_pword
|
||||
{
|
||||
unsigned long pwordLen; //* enhanced protection len & pword to set
|
||||
char pword[NSSS_MAX_EP_PWORD_LEN]; //* should be passed in # of chars
|
||||
} SS_PWORD_T;
|
||||
|
||||
|
||||
//* hint structure
|
||||
typedef struct _ss_hint
|
||||
{
|
||||
unsigned long hintLen; //* enhanced protection len & pword to set
|
||||
char hint[NSSS_MAX_MP_PWORD_HINT_LEN]; //* should be passed in # of chars
|
||||
} SS_HINT_T;
|
||||
|
||||
//* Read extended optional data
|
||||
typedef struct _sss_read_extension
|
||||
{
|
||||
unsigned long statFlags; //* OUT - return flags on the secret
|
||||
unsigned long crtStamp; //* OUT - secret creation time stamp
|
||||
unsigned long latStamp; //* OUT - last accessed time stamp (optional)
|
||||
unsigned long lmtStamp; //* OUT - last modified time stamp
|
||||
} SSS_READEXT_T;
|
||||
|
||||
//* Get service info extended data
|
||||
typedef struct _sss_get_service_information_extension
|
||||
{
|
||||
unsigned long statusFlags; //* OUT - return flags on the store
|
||||
unsigned long secretCount; //* OUT - number of the secrets in the store
|
||||
unsigned long lockCount; //* OUT - number of lock secrets
|
||||
unsigned long enumBufLen; //* OUT - secret ID enumeration buffer length
|
||||
unsigned long hidSecCount; //* OUT - count of hidden secrets
|
||||
unsigned long clientVersion; //* OUT - client version
|
||||
unsigned long serverVersion; //* OUT - server version
|
||||
unsigned long serverCryptoStrength; //* OUT - client crypto strength (Domestic/Export)
|
||||
unsigned long clientCryptoStrength; //* OUT - client crypto strength (Domestic/Export)
|
||||
unsigned long unlockTStamp; //* OUT - last admin unlock timestamp */
|
||||
unsigned long admnDNLen; //* OUT - last admin DN to unlock the store */
|
||||
char admnDN[NSSS_MAX_DN_LEN];
|
||||
unsigned long hintLen; //* OUT - master password hint
|
||||
char hint[NSSS_MAX_MP_PWORD_HINT_LEN];
|
||||
} SSS_GSINFOEXT_T;
|
||||
|
||||
|
||||
/* ###################################################################################### */
|
||||
/* #################### Extension Structure definitions for FUTURE ###################### */
|
||||
/* ###################################################################################### */
|
||||
|
||||
//* optional extension structure
|
||||
typedef struct _ss_extension
|
||||
{
|
||||
unsigned long clientVersion; //* IN - client version should be passed in
|
||||
void *extParms; //* IN - extended optional data defined for future
|
||||
} SS_EXT_T;
|
||||
|
||||
|
||||
#endif //* SSSHAR_H
|
||||
|
||||
typedef struct _sss_handles SSS_HANDLES_T;
|
||||
|
||||
//* new context structure to be allocated by the caller
|
||||
//* caller DN is an out parameter on NCP and can be an in parameter on LDAP
|
||||
typedef struct _sss_context
|
||||
{
|
||||
unsigned long flags; //* IN- context type indicator and
|
||||
//* initialization flags
|
||||
unsigned long dsCtx; //* IN/OUT- ldap/ncp context
|
||||
unsigned long version; //* IN- context version indicator
|
||||
SS_SERVER_INFO_T ssServerInfo; //* IN/OUT- preferred SecretStore server info
|
||||
SS_OBJECT_DN_T callerDN; //* IN/OUT- DN of the caller. OUT-For NCP.
|
||||
//*IN-For LDAP (use LDAP form)
|
||||
SSS_HANDLES_T *handles; //* OUT- internal, created by GetServiceInfo,
|
||||
//* destroyed with the context
|
||||
void *bindInfo; //* IN - LDAP or other advanced bind info (non-NCP)
|
||||
} SSS_CONTEXT_T;
|
||||
|
||||
|
||||
|
||||
#ifndef _SSSHS_H_
|
||||
|
||||
|
||||
#define SS_APPLICATION_TYPE_F 0x00000001L
|
||||
#define SS_CREDENTIAL_TYPE_F 0x00000002L
|
||||
|
||||
typedef struct _ss_sh_secret_id
|
||||
{
|
||||
int type; // The shared secret type i.e. SS_App or SS_CredSet
|
||||
char pName[NSSS_MAX_SECRET_ID_LEN]; // The shared secret name. This is the same as the identifier
|
||||
int len; // except that it excludes the header and is not escaped.
|
||||
} SS_SH_SECRET_ID_T;
|
||||
|
||||
|
||||
/* ########################## FUNCTION PROTOTYPES ######################### */
|
||||
|
||||
/* ##################################################################### */
|
||||
/* ######################### NEW NDK EXPORTED APIS ##################### */
|
||||
/* ##################################################################### */
|
||||
|
||||
//**************************************************************
|
||||
//* Support Functions for processing (populating or extracting)
|
||||
//* data components from a Shared Secret buffers
|
||||
//**************************************************************
|
||||
SS_EXTERN_LIBCALL_PTR(void)
|
||||
NSSSCreateSHSHandle();
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSDestroySHSHandle(void *handle); // in
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSGetNextSHSEntry
|
||||
(
|
||||
int bRestart, //* in (set to 1 to begin from head of list)
|
||||
void *handle, //* in
|
||||
int *keyLen, //* out
|
||||
unsigned char *key, //* out
|
||||
int *valLen, //* out
|
||||
unsigned char *val, //* out
|
||||
unsigned long ssCtxFlags //* int
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSAddSHSEntry
|
||||
(
|
||||
void *handle, //* in
|
||||
unsigned char *key, //* in
|
||||
unsigned char *val, //* in
|
||||
unsigned long ssCtxFlags //* in
|
||||
);
|
||||
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSRemoveSHSEntry
|
||||
(
|
||||
void *handle, //* in
|
||||
unsigned char *key, //* in
|
||||
unsigned char *value, //* in
|
||||
unsigned long ssCtxFlags //* in
|
||||
);
|
||||
|
||||
|
||||
//**************************************************************
|
||||
//* These function calls will utilize the Support Functions for
|
||||
//* populating or extracting data from a Shared Secret.
|
||||
//**************************************************************
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSWriteSharedSecret
|
||||
(
|
||||
void * handle,
|
||||
SS_SH_SECRET_ID_T * pSharedSecret,
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * epPassword,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSReadSharedSecret
|
||||
(
|
||||
void * handle,
|
||||
SS_SH_SECRET_ID_T * pSharedSecret,
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * epPassword,
|
||||
SSS_READEXT_T * readData,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSRemoveSharedSecret
|
||||
(
|
||||
SS_SH_SECRET_ID_T * pSharedSecret,
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
#endif //*_SSSHS_H_
|
||||
|
||||
//***********************
|
||||
//* SecretStore raw APIs
|
||||
//***********************
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSReadSecret
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * epPassword,
|
||||
SSS_READEXT_T * readData,
|
||||
SS_SECRET_ID_T * secretID,
|
||||
SS_SECRET_T * secretValue,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSWriteSecret
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * epPassword,
|
||||
SS_SECRET_ID_T * secretID,
|
||||
SS_SECRET_T * secretValue,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSRemoveSecret
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_SECRET_ID_T * secretID,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSGetServiceInformation
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SSS_GSINFOEXT_T * gsData,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSUnlockSecrets
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * passowrd,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSRemoveSecretStore
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSEnumerateSecretIDs
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
char * searchString,
|
||||
unsigned long * count,
|
||||
SS_SECRET_T * secretIDList,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
|
||||
SS_EXTERN_LIBCALL(int)
|
||||
NSSSSetEPMasterPassword
|
||||
(
|
||||
SSS_CONTEXT_T * context,
|
||||
SS_OBJECT_DN_T * targetObjDN,
|
||||
unsigned long ssFlags,
|
||||
SS_PWORD_T * passowrd,
|
||||
SS_HINT_T * hint,
|
||||
SS_EXT_T * ext
|
||||
);
|
||||
|
||||
/* ####################################################################### */
|
||||
/* ############################## ERROR CODES ############################ */
|
||||
/* ####################################################################### */
|
||||
|
||||
#ifndef _SSSHAR_H
|
||||
|
||||
#define NSSS_SUCCESS 0x00000000 /* 0 */
|
||||
#define NSSS_E_OBJECT_NOT_FOUND 0xFFFFFCE0 /* -800 */
|
||||
#define NSSS_E_NICI_FAILURE 0xFFFFFCDF /* -801 */
|
||||
#define NSSS_E_INVALID_SECRET_ID 0xFFFFFCDE /* -802 */
|
||||
#define NSSS_E_SYSTEM_FAILURE 0xFFFFFCDD /* -803 */
|
||||
#define NSSS_E_ACCESS_DENIED 0xFFFFFCDC /* -804 */
|
||||
#define NSSS_E_NDS_INTERNAL_FAILURE 0xFFFFFCDB /* -805 */
|
||||
#define NSSS_E_SECRET_UNINITIALIZED 0xFFFFFCDA /* -806 */
|
||||
#define NSSS_E_BUFFER_LEN 0xFFFFFCD9 /* -807 */
|
||||
#define NSSS_E_INCOMPATIBLE_VERSION 0xFFFFFCD8 /* -808 */
|
||||
#define NSSS_E_CORRUPTED_STORE 0xFFFFFCD7 /* -809 */
|
||||
#define NSSS_E_SECRET_ID_EXISTS 0xFFFFFCD6 /* -810 */
|
||||
#define NSSS_E_NDS_PWORD_CHANGED 0xFFFFFCD5 /* -811 */
|
||||
#define NSSS_E_INVALID_TARGET_OBJECT 0xFFFFFCD4 /* -812 */
|
||||
#define NSSS_E_STORE_NOT_FOUND 0xFFFFFCD3 /* -813 */
|
||||
#define NSSS_E_SERVICE_NOT_FOUND 0xFFFFFCD2 /* -814 */
|
||||
#define NSSS_E_SECRET_ID_TOO_LONG 0xFFFFFCD1 /* -815 */
|
||||
#define NSSS_E_ENUM_BUFF_TOO_SHORT 0xFFFFFCD0 /* -816 */
|
||||
#define NSSS_E_NOT_AUTHENTICATED 0xFFFFFCCF /* -817 */
|
||||
#define NSSS_E_NOT_SUPPORTED 0xFFFFFCCE /* -818 */
|
||||
#define NSSS_E_NDS_PWORD_INVALID 0xFFFFFCCD /* -819 */
|
||||
#define NSSS_E_NICI_OUTOF_SYNC 0xFFFFFCCC /* -820 */
|
||||
#define NSSS_E_SERVICE_NOT_SUPPORTED 0xFFFFFCCB /* -821 */
|
||||
#define NSSS_E_TOKEN_NOT_SUPPORTED 0xFFFFFCCA /* -822 */
|
||||
#define NSSS_E_UNICODE_OP_FAILURE 0xFFFFFCC9 /* -823 */
|
||||
#define NSSS_E_TRANSPORT_FAILURE 0xFFFFFCC8 /* -824 */
|
||||
#define NSSS_E_CRYPTO_OP_FAILURE 0xFFFFFCC7 /* -825 */
|
||||
#define NSSS_E_SERVER_CONN_FAILURE 0xFFFFFCC6 /* -826 */
|
||||
#define NSSS_E_CONN_ACCESS_FAILURE 0xFFFFFCC5 /* -827 */
|
||||
#define NSSS_E_ENUM_BUFF_TOO_LONG 0xFFFFFCC4 /* -828 */
|
||||
#define NSSS_E_SECRET_BUFF_TOO_LONG 0xFFFFFCC3 /* -829 */
|
||||
#define NSSS_E_SECRET_ID_TOO_SHORT 0xFFFFFCC2 /* -830 */
|
||||
#define NSSS_E_CORRUPTED_PACKET_DATA 0xFFFFFCC1 /* -831 */
|
||||
#define NSSS_E_EP_ACCESS_DENIED 0xFFFFFCC0 /* -832 */
|
||||
#define NSSS_E_SCHEMA_NOT_EXTENDED 0xFFFFFCBF /* -833 */
|
||||
#define NSSS_E_ATTR_NOT_FOUND 0xFFFFFCBE /* -834 */
|
||||
#define NSSS_E_MIGRATION_NEEDED 0xFFFFFCBD /* -835 */
|
||||
#define NSSS_E_MP_PWORD_INVALID 0xFFFFFCBC /* -836 */
|
||||
#define NSSS_E_MP_PWORD_NOT_SET 0xFFFFFCBB /* -837 */
|
||||
#define NSSS_E_MP_PWORD_NOT_ALLOWED 0xFFFFFCBA /* -838 */
|
||||
#define NSSS_E_WRONG_REPLICA_TYPE 0xFFFFFCB9 /* -839 */
|
||||
#define NSSS_E_ATTR_VAL_NOT_FOUND 0xFFFFFCB8 /* -840 */
|
||||
#define NSSS_E_INVALID_PARAM 0xFFFFFCB7 /* -841 */
|
||||
#define NSSS_E_NEED_SECURE_CHANNEL 0xFFFFFCB6 /* -842 */
|
||||
#define NSSS_E_CONFIG_NOT_SUPPORTED 0xFFFFFCB5 /* -843 */
|
||||
#define NSSS_E_STORE_NOT_LOCKED 0xFFFFFCB4 /* -844 */
|
||||
#define NSSS_E_TIME_OUT_OF_SYNC 0xFFFFFCB3 /* -845 */
|
||||
#define NSSS_E_VERSION_MISMATCH 0xFFFFFCB2 /* -846 */
|
||||
#define NSSS_E_SECRET_BUFF_TOO_SHORT 0xFFFFFCB1 /* -847 */
|
||||
#define NSSS_E_SH_SECRET_FAILURE 0xFFFFFCB0 /* -848 */
|
||||
#define NSSS_E_PARSER_FAILURE 0xFFFFFCAF /* -849 */
|
||||
#define NSSS_E_UTF8_OP_FAILURE 0xFFFFFCAE /* -850 */
|
||||
#define NSSS_E_CTX_LESS_CN_NOT_UNIQUE 0xFFFFFCAD /* -851 */
|
||||
#define NSSS_E_UNSUPPORTED_BIND_CRED 0xFFFFFCAC /* -852 */
|
||||
#define NSSS_E_CERTIFICATE_NOT_FOUND 0xFFFFFCAB /* -853 */
|
||||
|
||||
#define NSSS_E_NOT_IMPLEMENTED 0xFFFFFC88 /* -888 */
|
||||
#define NSSS_E_BETA_EXPIRED 0xFFFFFC7D /* -899 */
|
||||
|
||||
|
||||
/* #########################################################################
|
||||
########################### ERROR DESCRIPTIONS ##########################
|
||||
#########################################################################
|
||||
|
||||
NSSS_E_OBJECT_NOT_FOUND -800
|
||||
Description: Can't find the target object DN in NDS. (Resolve name failed.)
|
||||
|
||||
NSSS_E_NICI_FAILURE -801
|
||||
Description: NICI operations have failed.
|
||||
|
||||
NSSS_E_INVALID_SECRET_ID -802
|
||||
Description: Secret ID is not in the User Secret Store.
|
||||
|
||||
NSSS_E_SYSTEM_FAILURE -803
|
||||
Description: Some internal operating system services have not been available.
|
||||
|
||||
NSSS_E_ACCESS_DENIED -804
|
||||
Description: Access to the target Secret Store has been denied!
|
||||
|
||||
NSSS_E_NDS_INTERNAL_FAILURE -805
|
||||
Description: Some internal NDS services have not been available.
|
||||
|
||||
NSSS_E_SECRET_UNINITIALIZED -806
|
||||
Description: Secret has not been initialized with a write.
|
||||
|
||||
NSSS_E_BUFFER_LEN -807
|
||||
Description: Size of the buffer is not in a nominal range between minimum and maximum.
|
||||
|
||||
NSSS_E_INCOMPATIBLE_VERSION -808
|
||||
Description: Client and server components are not of the compatible versions.
|
||||
|
||||
NSSS_E_CORRUPTED_STORE -809
|
||||
Description: Secret Store data on the server has been corrupted.
|
||||
|
||||
NSSS_E_SECRET_ID_EXISTS -810
|
||||
Description: Secret ID already exists in the Secret Store.
|
||||
|
||||
NSSS_E_NDS_PWORD_CHANGED -811
|
||||
Description: User NDS password has been changed by the administrator.
|
||||
|
||||
NSSS_E_INVALID_TARGET_OBJECT -812
|
||||
Description: Target NDS User object not found.
|
||||
|
||||
NSSS_E_STORE_NOT_FOUND -813
|
||||
Description: Target NDS User object does not have a Secret Store.
|
||||
|
||||
NSSS_E_SERVICE_NOT_FOUND -814
|
||||
Description: Secret Store not on the Network.
|
||||
|
||||
NSSS_E_SECRET_ID_TOO_LONG -815
|
||||
Description: Lenght of the Secret ID buffer exceeds the limit.
|
||||
|
||||
NSSS_E_ENUM_BUFF_TOO_SHORT -816
|
||||
Description: Lenght of the Enumeration buffer too short.
|
||||
|
||||
NSSS_E_NOT_AUTHENTICATED -817
|
||||
Description: User not authenticated.
|
||||
|
||||
NSSS_E_NOT_SUPPORTED -818
|
||||
Description: Not supported operations.
|
||||
|
||||
NSSS_E_NDS_PWORD_INVALID -819
|
||||
Description: Typed in NDS password not valid.
|
||||
|
||||
NSSS_E_NICI_OUTOF_SYNC -820
|
||||
Description: Session keys of the client and server NICI are out of sync.
|
||||
|
||||
NSSS_E_SERVICE_NOT_SUPPORTED -821
|
||||
Description: Requested service not supported yet.
|
||||
|
||||
NSSS_E_TOKEN_NOT_SUPPORTED -822
|
||||
Description: NDS authentication type not supported.
|
||||
|
||||
NSSS_E_UNICODE_OP_FAILURE -823
|
||||
Description: Unicode text conversion operation failed.
|
||||
|
||||
NSSS_E_TRANSPORT_FAILURE -824
|
||||
Description: Connection to server is lost.
|
||||
|
||||
NSSS_E_CRYPTO_OP_FAILURE -825
|
||||
Description: Cryptographic operation failed.
|
||||
|
||||
NSSS_E_SERVER_CONN_FAILURE -826
|
||||
Description: Opening a connection to the server failed.
|
||||
|
||||
NSSS_E_CONN_ACCESS_FAILURE -827
|
||||
Description: Access to server connection failed.
|
||||
|
||||
NSSS_E_ENUM_BUFF_TOO_LONG -828
|
||||
Description: Size of the enumeration buffer exceeds the limit.
|
||||
|
||||
NSSS_E_SECRET_BUFF_TOO_LONG -829
|
||||
Description: Size of the Secret buffer exceeds the limit.
|
||||
|
||||
NSSS_E_SECRET_ID_TOO_SHORT -830
|
||||
Description: Lenght of the Secret ID should be greater than zero.
|
||||
|
||||
NSSS_E_CORRUPTED_PACKET_DATA -831
|
||||
Description: Protocol data corrupted on the wire.
|
||||
|
||||
NSSS_E_EP_ACCESS_DENIED -832
|
||||
Description: EP password validation failed. Access to the secret denied!
|
||||
|
||||
NSSS_E_SCHEMA_NOT_EXTENDED -833
|
||||
Description: Schema is not extended to support SecreStore on the target tree.
|
||||
|
||||
NSSS_E_ATTR_NOT_FOUND -834
|
||||
Description: One of the optional service attributes is not instantiated.
|
||||
|
||||
NSSS_E_MIGRATION_NEEDED -835
|
||||
Description: Server has been upgraded and user SecretStore should be updated.
|
||||
|
||||
NSSS_E_MP_PWORD_INVALID -836
|
||||
Description: Master passwrod could not be verified to read or unlock the secrets.
|
||||
|
||||
NSSS_E_MP_PWORD_NOT_SET -837
|
||||
Description: Master password has not been set on the SecretStore.
|
||||
|
||||
NSSS_E_MP_PWORD_NOT_ALLOWED -838
|
||||
Description: Ability to use master password has been disabled.
|
||||
|
||||
NSSS_E_WRONG_REPLICA_TYPE -839
|
||||
Description: Not a writeable replica of NDS.
|
||||
|
||||
NSSS_E_ATTR_VAL_NOT_FOUND -840
|
||||
Description: Target attrbute is not instantiated in NDS.
|
||||
|
||||
NSSS_E_INVALID_PARAM -841
|
||||
Description: API parameter is not initialized.
|
||||
|
||||
NSSS_E_NEED_SECURE_CHANNEL -842
|
||||
Description: Connection to the SecretStore needs to be over SSL.
|
||||
|
||||
NSSS_E_CONFIG_NOT_SUPPORTED -843
|
||||
Description: No server to support the given override configuration is found.
|
||||
|
||||
NSSS_E_STORE_NOT_LOCKED -844
|
||||
Description: Attempt to unlock SecretStore failed because the store is not locked.
|
||||
|
||||
NSSS_E_TIME_OUT_OF_SYNC -845
|
||||
Description: NDS Replica on the server that holds SecretStore is out of sync with the replica ring.
|
||||
|
||||
NSSS_E_VERSION_MISMATCH -846
|
||||
Description: Versions of the client dlls don't match.
|
||||
|
||||
NSSS_E_SECRET_BUFF_TOO_SHORT -847
|
||||
Description: Buffer supplied for the secret is too short (minimum NSSS_MIN_IDLIST_BUF_LEN).
|
||||
|
||||
NSSS_E_SH_SECRET_FAILURE -848
|
||||
Description: Shared Secret processing and operations failed.
|
||||
|
||||
NSSS_E_PARSER_FAILURE -849
|
||||
Description: Shared Secret parser operations failed.
|
||||
|
||||
NSSS_E_UTF8_OP_FAILURE -850
|
||||
Description: Utf8 string operations failed.
|
||||
|
||||
NSSS_E_CTX_LESS_CN_NOT_UNIQUE -851
|
||||
Description: Contextless name for LDAP bind does not resolve to a unique DN
|
||||
|
||||
NSSS_E_UNSUPPORTED_BIND_CRED -852
|
||||
Description: login credential for advanced bind is not supported
|
||||
|
||||
NSSS_E_CERTIFICATE_NOT_FOUND -853
|
||||
Description: LDAP Root Cert required for Bind operations not found
|
||||
|
||||
|
||||
NSSS_E_NOT_IMPLEMENTED -888
|
||||
Description: Feature not implemented yet.
|
||||
|
||||
NSSS_E_BETA_EXPIRED -899
|
||||
Description: Product's BETA life has expired! Official release copy should be
|
||||
purchased.
|
||||
|
||||
|
||||
|
||||
########################### END OFERROR CODES ########################## */
|
||||
|
||||
|
||||
/* ######################################################################## */
|
||||
/* #################### TRANSLATION MACROS FOR OLD NAMES ################## */
|
||||
/* ######################################################################## */
|
||||
|
||||
#define NSSO_SUCCESS NSSS_SUCCESS
|
||||
#define NSSO_E_OBJECT_NOT_FOUND NSSS_E_OBJECT_NOT_FOUND
|
||||
#define NSSO_E_NICI_FAILURE NSSS_E_NICI_FAILURE
|
||||
#define NSSO_E_INVALID_SECRET_ID NSSS_E_INVALID_SECRET_ID
|
||||
#define NSSO_E_SYSTEM_FAILURE NSSS_E_SYSTEM_FAILURE
|
||||
#define NSSO_E_ACCESS_DENIED NSSS_E_ACCESS_DENIED
|
||||
#define NSSO_E_NDS_INTERNAL_FAILURE NSSS_E_NDS_INTERNAL_FAILURE
|
||||
#define NSSO_E_SECRET_UNINITIALIZED NSSS_E_SECRET_UNINITIALIZED
|
||||
#define NSSO_E_BUFFER_LEN NSSS_E_BUFFER_LEN
|
||||
#define NSSO_E_INCOMPATIBLE_VERSION NSSS_E_INCOMPATIBLE_VERSION
|
||||
#define NSSO_E_CORRUPTED_STORE NSSS_E_CORRUPTED_STORE
|
||||
#define NSSO_E_SECRET_ID_EXISTS NSSS_E_SECRET_ID_EXISTS
|
||||
#define NSSO_E_NDS_PWORD_CHANGED NSSS_E_NDS_PWORD_CHANGED
|
||||
#define NSSO_E_INVALID_TARGET_OBJECT NSSS_E_INVALID_TARGET_OBJECT
|
||||
#define NSSO_E_STORE_NOT_FOUND NSSS_E_STORE_NOT_FOUND
|
||||
#define NSSO_E_SERVICE_NOT_FOUND NSSS_E_SERVICE_NOT_FOUND
|
||||
#define NSSO_E_SECRET_ID_TOO_LONG NSSS_E_SECRET_ID_TOO_LONG
|
||||
#define NSSO_E_ENUM_BUFF_TOO_SHORT NSSS_E_ENUM_BUFF_TOO_SHORT
|
||||
#define NSSO_E_NOT_AUTHENTICATED NSSS_E_NOT_AUTHENTICATED
|
||||
#define NSSO_E_NOT_SUPPORTED NSSS_E_NOT_SUPPORTED
|
||||
#define NSSO_E_NDS_PWORD_INVALID NSSS_E_NDS_PWORD_INVALID
|
||||
#define NSSO_E_NICI_OUTOF_SYNC NSSS_E_NICI_OUTOF_SYNC
|
||||
#define NSSO_E_SERVICE_NOT_SUPPORTED NSSS_E_SERVICE_NOT_SUPPORTED
|
||||
#define NSSO_E_TOKEN_NOT_SUPPORTED NSSS_E_TOKEN_NOT_SUPPORTED
|
||||
#define NSSO_E_UNICODE_OP_FAILURE NSSS_E_UNICODE_OP_FAILURE
|
||||
#define NSSO_E_TRANSPORT_FAILURE NSSS_E_TRANSPORT_FAILURE
|
||||
#define NSSO_E_CRYPTO_OP_FAILURE NSSS_E_CRYPTO_OP_FAILURE
|
||||
#define NSSO_E_SERVER_CONN_FAILURE NSSS_E_SERVER_CONN_FAILURE
|
||||
#define NSSO_E_CONN_ACCESS_FAILURE NSSS_E_CONN_ACCESS_FAILURE
|
||||
#define NSSO_E_ENUM_BUFF_TOO_LONG NSSS_E_ENUM_BUFF_TOO_LONG
|
||||
#define NSSO_E_SECRET_BUFF_TOO_LONG NSSS_E_SECRET_BUFF_TOO_LONG
|
||||
#define NSSO_E_SECRET_ID_TOO_SHORT NSSS_E_SECRET_ID_TOO_SHORT
|
||||
#define NSSO_E_CORRUPTED_PACKET_DATA NSSS_E_CORRUPTED_PACKET_DATA
|
||||
#define NSSO_E_EP_ACCESS_DENIED NSSS_E_EP_ACCESS_DENIED
|
||||
#define NSSO_E_SCHEMA_NOT_EXTENDED NSSS_E_SCHEMA_NOT_EXTENDED
|
||||
#define NSSO_E_ATTR_NOT_FOUND NSSS_E_ATTR_NOT_FOUND
|
||||
#define NSSO_E_MIGRATION_NEEDED NSSS_E_MIGRATION_NEEDED
|
||||
#define NSSO_E_MP_PWORD_INVALID NSSS_E_MP_PWORD_INVALID
|
||||
#define NSSO_E_MP_PWORD_NOT_SET NSSS_E_MP_PWORD_NOT_SET
|
||||
#define NSSO_E_MP_PWORD_NOT_ALLOWED NSSS_E_MP_PWORD_NOT_ALLOWED
|
||||
#define NSSO_E_WRONG_REPLICA_TYPE NSSS_E_WRONG_REPLICA_TYPE
|
||||
#define NSSO_E_ATTR_VAL_NOT_FOUND NSSS_E_ATTR_VAL_NOT_FOUND
|
||||
#define NSSO_E_INVALID_PARAM NSSS_E_INVALID_PARAM
|
||||
#define NSSO_E_NEED_SECURE_CHANNEL NSSS_E_NEED_SECURE_CHANNEL
|
||||
#define NSSO_E_CONFIG_NOT_SUPPORTED NSSS_E_CONFIG_NOT_SUPPORTED
|
||||
#define NSSO_E_STORE_NOT_LOCKED NSSS_E_STORE_NOT_LOCKED
|
||||
#define NSSO_E_TIME_OUT_OF_SYNC NSSS_E_TIME_OUT_OF_SYNC
|
||||
|
||||
#define NSSO_E_NOT_IMPLEMENTED NSSS_E_NOT_IMPLEMENTED
|
||||
#define NSSO_E_BETA_EXPIRED NSSS_E_BETA_EXPIRED
|
||||
|
||||
#define NSSO_NICI_UNDETERMINED_ENGINE NSSS_NICI_UNDETERMINED_ENGINE
|
||||
#define NSSO_NICI_DOMESTIC_ENGINE NSSS_NICI_DOMESTIC_ENGINE
|
||||
#define NSSO_NICI_EXPORT_ENGINE NSSS_NICI_EXPORT_ENGINE
|
||||
|
||||
#endif /* _NSSS_H */
|
||||
|
||||
|
||||
#define NSSO_VERSION_NUMBER NSSS_VERSION_NUMBER
|
||||
#define NSSO_MAX_SECRET_ID_CHARS NSSS_MAX_SECRET_ID_CHARS
|
||||
#define NSSO_MAX_SECRET_ID_LEN NSSS_MAX_SECRET_ID_LEN
|
||||
#define NSSO_MID_SECRET_BUF_LEN NSSS_MID_SECRET_BUF_LEN
|
||||
#define NSSO_MAX_SECRET_BUF_LEN NSSS_MAX_SECRET_BUF_LEN
|
||||
#define NSSO_MAX_EP_PWORD_CHARS NSSS_MAX_EP_PWORD_CHARS
|
||||
#define NSSO_MAX_EP_PWORD_LEN NSSS_MAX_EP_PWORD_LEN
|
||||
#define NSSO_MAX_LDAP_PWORD_LEN NSSS_MAX_LDAP_PWORD_LEN
|
||||
#define NSSO_MAX_MP_PWORD_HINT_CHARS NSSS_MAX_MP_PWORD_HINT_CHARS
|
||||
#define NSSO_MAX_MP_PWORD_HINT_LEN NSSS_MAX_MP_PWORD_HINT_LEN
|
||||
#define NSSO_MAX_TREE_NAME_CHARS NSSS_MAX_TREE_NAME_CHARS
|
||||
#define NSSO_MAX_TREE_NAME_LEN NSSS_MAX_TREE_NAME_LEN
|
||||
#define NSSO_MAX_DN_CHARS NSSS_MAX_DN_CHARS
|
||||
#define NSSO_MAX_DN_LEN NSSS_MAX_DN_LEN
|
||||
#define NSSO_MAX_IP_ADDR_LEN NSSS_MAX_IP_ADDR_LEN
|
||||
#define NSSO_MIN_IDLIST_BUF_LEN NSSS_MIN_IDLIST_BUF_LEN
|
||||
#define NSSO_MID_IDLIST_BUF_LEN NSSS_MID_IDLIST_BUF_LEN
|
||||
#define NSSO_MAX_IDLIST_BUF_LEN NSSS_MAX_IDLIST_BUF_LEN
|
||||
#define NSSO_JUMBO_IDLIST_BUF_LEN NSSS_JUMBO_IDLIST_BUF_LEN
|
||||
#define NSSO_JUMBO_ENUM_BUF_LEN NSSS_JUMBO_ENUM_BUF_LEN
|
||||
#define NSSO_ENUM_BUFFER_GUESS NSSS_ENUM_BUFFER_GUESS
|
||||
#define NSSO_ENUM_DELIM NSSS_ENUM_DELIM
|
||||
|
||||
#define NSSO_REMOVE_LOCK_FROM_STORE_F NSSS_REMOVE_LOCK_FROM_STORE_F
|
||||
#define NSSO_ENHANCED_PROTECTION_F NSSS_ENHANCED_PROTECTION_F
|
||||
#define NSSO_CREATE_ID_F NSSS_CREATE_ID_F
|
||||
#define NSSO_EP_PASSWORD_USED_F NSSS_EP_PASSWORD_USED_F
|
||||
#define NSSO_REPAIR_THE_STORE_F NSSS_REPAIR_THE_STORE_F
|
||||
#define NSSO_ALL_STRINGS_UNICODE_F NSSS_ALL_STRINGS_UNICODE_F
|
||||
#define NSSO_SET_TREE_NAME_F NSSS_SET_TREE_NAME_F
|
||||
#define NSSO_DESTROY_CONTEXT_F NSSS_DESTROY_CONTEXT_F
|
||||
#define NSSO_UNBINDLDAP_F NSSS_UNBINDLDAP_F
|
||||
#define NSSO_GET_CONTEXT_F NSSS_GET_CONTEXT_F
|
||||
#define NSSO_BINDLDAP_F NSSS_BINDLDAP_F
|
||||
#define NSSO_SECRET_LOCKED_F NSSS_SECRET_LOCKED_F
|
||||
#define NSSO_SECRET_NOT_INITIALIZED_F NSSS_SECRET_NOT_INITIALIZED_F
|
||||
#define NSSO_ENHANCED_PROTECT_INFO_F NSSS_ENHANCED_PROTECT_INFO_F
|
||||
#define NSSO_STORE_NOT_SYNCED_F NSSS_STORE_NOT_SYNCED_F
|
||||
#define NSSO_EP_PWORD_PRESENT_F NSSS_EP_PWORD_PRESENT_F
|
||||
#define NSSO_EP_MASTER_PWORD_USED_F NSSS_EP_MASTER_PWORD_USED_F
|
||||
#define NSSO_ADMIN_LAST_MOD_F NSSS_ADMIN_LAST_MOD_F
|
||||
#define NSSO_EP_MASTER_PWORD_PRESENT_F NSSS_EP_MASTER_PWORD_PRESENT_F
|
||||
#define NSSO_MP_NOT_ALLOWED_F NSSS_MP_NOT_ALLOWED_F
|
||||
#define NSSO_SYNC_IN_PROGRESS_F NSSS_SYNC_IN_PROGRESS_F
|
||||
#define NSSO_ADMIN_UNLOCKED_F NSSS_ADMIN_UNLOCKED_F
|
||||
#define NSSO_DS_CTX_F NSSS_NCP_CTX_F
|
||||
#define NSSO_LDAP_CTX_F NSSS_LDAP_CTX_F
|
||||
#define NSSO_NICI_CTX_F NSSS_NICI_CTX_F
|
||||
|
||||
#define NSSO_ReadSecret NSSS_ReadSecret
|
||||
#define NSSO_WriteSecret NSSS_WriteSecret
|
||||
#define NSSO_AddSecretID NSSS_AddSecretID
|
||||
#define NSSO_RemoveSecretID NSSS_RemoveSecret
|
||||
#define NSSO_GetServiceInformation NSSS_GetServiceInformation
|
||||
#define NSSO_UnlockSecrets NSSS_UnlockSecrets
|
||||
#define NSSO_RemoveSecretStore NSSS_RemoveSecretStore
|
||||
#define NSSO_EnumerateSecretIDs NSSS_EnumerateSecretIDs
|
||||
#define NSSO_SetEPMasterPassword NSSS_SetEPMasterPassword
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NSSSCL_H */
|
||||
118
include/sscs_unx_cache_defines.h
Normal file
118
include/sscs_unx_cache_defines.h
Normal file
@@ -0,0 +1,118 @@
|
||||
#ifndef _SSCS_UNX_CACHE_DEFINES_H_
|
||||
#define _SSCS_UNX_CACHE_DEFINES_H_
|
||||
|
||||
// internal definitions
|
||||
|
||||
// Lengths of message fields
|
||||
#define MSGID_LEN 2
|
||||
#define MSG_LEN 4
|
||||
#define MSG_WORD_LEN 2
|
||||
#define MSG_DWORD_LEN 4
|
||||
#define MSG_STRING_LEN 4
|
||||
|
||||
// Some fixed message lengths for request and reply
|
||||
#define MSG_REPLY_OPENSS 14
|
||||
#define MSG_REPLY_GENERAL 10
|
||||
#define MSG_REPLY_GETSSINFO 14
|
||||
#define MSG_REPLY_GETKEYCHAIN_INFO 22
|
||||
|
||||
/* Return Codes from ipc server (sscs) to the client(cachelib).
|
||||
*/
|
||||
|
||||
#define SSCS_REPLY_SUCCESS 0
|
||||
#define SSCS_E_INVALID_MESSAGE -1
|
||||
#define SSCS_E_VERSION_NOT_SUPPORTED -2
|
||||
#define SSCS_E_SYSTEM_ERROR -3
|
||||
#define SSCS_E_REPLY_NOT_AVAILABLE -4
|
||||
#define SSCS_E_INVALID_KEYCHAIN -5
|
||||
#define SSCS_E_INVALID_SECRETID -6
|
||||
#define SSCS_E_KEYCHAIN_ALREADY_EXISTS -7
|
||||
#define SSCS_E_MAX_KEYCHAINS_REACHED -8
|
||||
#define SSCS_E_ADD_KEYCHAIN_FAILED -9
|
||||
#define SSCS_E_NO_KEYCHAINS_EXIST -10
|
||||
#define SSCS_E_KEYCHAIN_DOES_NOT_EXIST -11
|
||||
#define SSCS_E_REMOVE_KEYCHAIN_FAILED -12
|
||||
#define SSCS_E_WRITE_SECRET_FAILED -13
|
||||
#define SSCS_E_ADDING_DEFAULT_KEYCHAIN_FAILED -14
|
||||
#define SSCS_E_NO_SECRETS_EXIST -15
|
||||
#define SSCS_E_REMOVE_SECRET_FAILED -16
|
||||
#define SSCS_E_GET_SOCKET_PATH_FAILED -17
|
||||
#define SSCS_E_CREATE_SOCKET_FAILED -18
|
||||
#define SSCS_E_SECRETID_DOES_NOT_EXIST -19
|
||||
#define SSCS_E_INVALID_INPUT -20
|
||||
#define SSCS_E_SETTING_PASSCODE_FAILED -21
|
||||
#define SSCS_STORE_IS_PERSISTENT -22
|
||||
#define SSCS_STORE_IS_NOT_PERSISTENT -23
|
||||
#define SSCS_SECRET_IS_PERSISTENT -24
|
||||
#define SSCS_SECRET_IS_NOT_PERSISTENT -25
|
||||
|
||||
|
||||
#define SSCS_E_INCORRECT_FUNCTION_CALL_SEQUENCE -30
|
||||
|
||||
/* Request and Response message Ids.
|
||||
*/
|
||||
|
||||
#define MAX_MESSAGES 14
|
||||
|
||||
|
||||
#define REQ_CACHE_OPEN_SECRET_STORE_MSGID 0x0001
|
||||
#define RESP_CACHE_OPEN_SECRET_STORE_MSGID 0x1001
|
||||
|
||||
#define REQ_CACHE_CLOSE_SECRET_STORE_MSGID 0x0002
|
||||
#define RESP_CACHE_CLOSE_SECRET_STORE_MSGID 0x1002
|
||||
|
||||
#define REQ_CACHE_REMOVE_SECRET_STORE_MSGID 0x0003
|
||||
#define RESP_CACHE_REMOVE_SECRET_STORE_MSGID 0x1003
|
||||
|
||||
#define REQ_CACHE_ENUMERATE_KEYCHAINIDS_MSGID 0x0004
|
||||
#define RESP_CACHE_ENUMERATE_KEYCHAINIDS_MSGID 0x1004
|
||||
|
||||
#define REQ_CACHE_ADD_KEYCHAIN_MSGID 0x0005
|
||||
#define RESP_CACHE_ADD_KEYCHAIN_MSGID 0x1005
|
||||
|
||||
#define REQ_CACHE_REMOVE_KEYCHAIN_MSGID 0x0006
|
||||
#define RESP_CACHE_REMOVE_KEYCHAIN_MSGID 0x1006
|
||||
|
||||
#define REQ_CACHE_ENUMERATE_SECRETIDS_MSGID 0x0007
|
||||
#define RESP_CACHE_ENUMERATE_SECRETIDS_MSGID 0x1007
|
||||
|
||||
#define REQ_CACHE_READ_SECRET_MSGID 0x0008
|
||||
#define RESP_CACHE_READ_SECRET_MSGID 0x1008
|
||||
|
||||
#define REQ_CACHE_WRITE_SECRET_MSGID 0x0009
|
||||
#define RESP_CACHE_WRITE_SECRET_MSGID 0x1009
|
||||
|
||||
#define REQ_CACHE_REMOVE_SECRET_MSGID 0x000A
|
||||
#define RESP_CACHE_REMOVE_SECRET_MSGID 0x100A
|
||||
|
||||
#define REQ_GET_SECRETSTORE_INFO_MSGID 0x000B
|
||||
#define RESP_GET_SECRETSTORE_INGO_MSGID 0x100B
|
||||
|
||||
#define REQ_GET_KEYCHAIN_INFO_MSGID 0x000C
|
||||
#define RESP_GET_KEYCHAIN_INFO_MSGID 0x100C
|
||||
|
||||
#define REQ_LOCK_CACHE_MSGID 0x000D
|
||||
#define RESP_LOCK_CACHE_MSGID 0x100D
|
||||
|
||||
#define REQ_UNLOCK_CACHE_MSGID 0x000E
|
||||
#define RESP_UNLOCK_CACHE_MSGID 0x100E
|
||||
|
||||
#define REQ_SET_MASTER_PASSCODE 0x000F
|
||||
#define RESP_SET_MASTER_PASSCODE 0x100F
|
||||
|
||||
#define REQ_READ_KEY_MSGID 0x0010
|
||||
#define RESP_READ_KEY_MSGID 0x1010
|
||||
|
||||
#define REQ_WRITE_KEY_MSGID 0x0011
|
||||
#define RESP_WRITE_KEY_MSGID 0x1011
|
||||
|
||||
#define REQ_SET_MASTER_PASSWORD 0x0012
|
||||
#define RESP_SET_MASTER_PASSWORD 0x1021
|
||||
|
||||
#define REQ_IS_SECRET_PERSISTENT 0x0013
|
||||
#define RESP_IS_SECRET_PERSISTENT 0x1013
|
||||
|
||||
#define EXT_TYPE_WINDOWS_LUID 0x00000001;
|
||||
#define WINDOWS_LUID_LEN 0x00000008;
|
||||
|
||||
#endif //_CACHE_DEFINES_H_
|
||||
78
include/sscs_unx_ipc_client.h
Normal file
78
include/sscs_unx_ipc_client.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#ifndef _SSCS_UNX_IPC_CLIENT_H_
|
||||
#define _SSCS_UNX_IPC_CLIENT_H_
|
||||
|
||||
#ifdef SSCS_LINUX_PLAT_F
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
#ifdef SSCS_LINUX_PLAT_F
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#include <wchar.h>
|
||||
#include "sscs_unx_cache_defines.h"
|
||||
|
||||
#ifndef _SSCS_CACHE_H
|
||||
#include "../include/sscs_cache.h"
|
||||
#endif
|
||||
#include "../include/sscs_trans.h"
|
||||
|
||||
// Used for global buffers.
|
||||
//#define MIN_REQUEST_BUF_LEN 1024
|
||||
//#define MIN_REPLY_BUF_LEN 4096
|
||||
|
||||
// Some debug stuff
|
||||
#ifdef DEBUG
|
||||
#define DMSG(x) printf x
|
||||
#else
|
||||
#define DMSG(x)
|
||||
#endif
|
||||
|
||||
typedef struct ipcOpenSecretStoreReqMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
unsigned int version;
|
||||
unsigned int ssNameLen;
|
||||
unsigned char ssName[0];
|
||||
} IPC_OPEN_SECRETSTOR_REQ_MSG;
|
||||
|
||||
typedef struct ipcOpenSecretStoreResMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
int retVal;
|
||||
unsigned int version;
|
||||
}IPC_OPEN_SECRETSTOR_RES_MSG;
|
||||
|
||||
typedef struct ipcCloseSecretStoreReqMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
}IPC_CLOSE_SECRETSTORE_REQ_MSG;
|
||||
|
||||
typedef struct ipcCloseSecretStoreResMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
int retVal;
|
||||
}IPC_CLOSE_SECRETSTORE_RES_MSG;
|
||||
|
||||
typedef struct ipcRemoveSecretStoreReqMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
}IPC_REMOVE_SECRETSTORE_REQ_MSG;
|
||||
|
||||
typedef struct ipcRemoveSecretStoreResMsg
|
||||
{
|
||||
unsigned short msgid;
|
||||
unsigned int msgLen;
|
||||
int retVal;
|
||||
}IPC_REMOVE_SECRETSTORE_RES_MSG;
|
||||
|
||||
#endif //_IPC_CLIENT_H_
|
||||
45
include/sscs_utf8.h
Normal file
45
include/sscs_utf8.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/**************************************************************************
|
||||
* %name: sscs_utf8.h %
|
||||
* %instance: security_1 %
|
||||
* %version: 2 %
|
||||
* %created_by: cameron %
|
||||
* %date_modified: Wed Apr 06 13:40:09 2005 %
|
||||
***************************************************************************
|
||||
* This is the header file for utf8 utility functions.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _SSUTF8_H_
|
||||
#define _SSUTF8_H_
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "sscs_string.h"
|
||||
|
||||
#ifndef _MICASA_H_
|
||||
/* defining the utf8 for SSCS */
|
||||
typedef unsigned char SS_UTF8_T;
|
||||
#endif
|
||||
|
||||
#define sscs_Utf8Strlen(s) sscs_strlen((s))
|
||||
#define sscs_Utf8StrSize(s) (sscs_strlen((s)) ? (sscs_strlen((s))+1) : 0)
|
||||
#define sscs_Utf8Strcpy(s1, s2) sscs_strcpy((s1), (s2))
|
||||
#define sscs_Utf8Strcat(s1, s2) sscs_strcat((s1), (s2))
|
||||
#define sscs_Utf8Strcmp(s1, s2) sscs_strcmp((s1), (s2))
|
||||
#define sscs_Utf8Stricmp(s1, s2) sscs_stricmp((s1), (s2))
|
||||
#define sscs_Utf8Strstr(s1, s2) sscs_strstr((s1), (s2))
|
||||
#define sscs_Utf8Strchr(s1, c) sscs_strchr((s1), (c))
|
||||
#define sscs_Utf8Strncat(s1, s2, c) sscs_strncat((s1), (s2), (c))
|
||||
#define sscs_Utf8Strncmp(s1, s2, c) sscs_strncmp((s1), (s2), (c))
|
||||
#define sscs_Utf8Strncpy(s1, s2, c) sscs_strncpy((s1), (s2), (c))
|
||||
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
268
include/sscs_win_secretstoredef.h
Normal file
268
include/sscs_win_secretstoredef.h
Normal file
@@ -0,0 +1,268 @@
|
||||
//++=======================================================================
|
||||
// Program Name: Novell XTier Authentication Services
|
||||
// File Name: SECRETSTORE.H
|
||||
// Version: v1.00
|
||||
// Authors: Jim Norman (jnorman)
|
||||
// Abstract: This module contains definition and prototype information
|
||||
// for the local secret store sevice.
|
||||
// Revision History:
|
||||
//
|
||||
//
|
||||
// (C) Unpublished Copyright of Novell, Inc. All Rights Reserved.
|
||||
//
|
||||
// No part of this file may be duplicated, revised, translated, localized,
|
||||
// or modified in any manner or compiled, linked or uploaded or downloaded
|
||||
// to or from any computer system without the prior written consent of
|
||||
// Novell, Inc.
|
||||
//=======================================================================--
|
||||
|
||||
#ifndef _SECRETSTOREDEF_
|
||||
#define _SECRETSTOREDEF_
|
||||
|
||||
|
||||
//===[ Header files specific to this module ]==============================
|
||||
#include <ncpltype.h>
|
||||
#include <cppsup.h>
|
||||
#include <nscmdef.h>
|
||||
|
||||
//===[ Manifest constants ]==============================
|
||||
|
||||
// {A118B15C-66A3-46ba-BA3B-D45FBBF0C5DA}
|
||||
DEFINE_GUID(CLSID_SecretStoreClientService,
|
||||
0xa118b15c,
|
||||
0x66a3,
|
||||
0x46ba,
|
||||
0xba, 0x3b, 0xd4, 0x5f, 0xbb, 0xf0, 0xc5, 0xda);
|
||||
|
||||
// {6DF6121E-C823-43dd-9D1C-7B89056CC4AE}
|
||||
DEFINE_GUID(IID_SSCS,
|
||||
0x6df6121e,
|
||||
0xc823,
|
||||
0x43dd,
|
||||
0x9d, 0x1c, 0x7b, 0x89, 0x5, 0x6c, 0xc4, 0xae);
|
||||
|
||||
|
||||
//===[ Structure Definitions ]==============================
|
||||
|
||||
//===[ Function Prototypes ]==============================
|
||||
|
||||
// {54BFEBE2-F726-44d9-AEDE-E9252FA99549}
|
||||
DEFINE_GUID(IID_VerifyAccessSS_1,
|
||||
0x2d4c7faa,
|
||||
0x8e3c,
|
||||
0x4c70,
|
||||
0x87, 0xa7, 0xc8, 0x7d, 0xad, 0x80, 0x2a, 0xd);
|
||||
|
||||
/*
|
||||
0x54bfebe2,
|
||||
0xf726,
|
||||
0x44d9,
|
||||
0xae, 0xde, 0xe9, 0x25, 0x2f, 0xa9, 0x95, 0x49);
|
||||
*/
|
||||
|
||||
#undef NICM_INTERFACE
|
||||
#define NICM_INTERFACE IVerifiedAccessSS
|
||||
|
||||
|
||||
NICM_DECLARE_INHERITTED_INTERFACE(IVerifiedAccessSS, NICM_IUnknown)
|
||||
{
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(QueryInterface) (
|
||||
IN THISPTR
|
||||
IN const GUID *pIId,
|
||||
OUT void **ppvObj
|
||||
) PURE;
|
||||
|
||||
VIRT UINT32 NICM_STDMETHOD
|
||||
(AddRef) (
|
||||
IN THISPTRONLY
|
||||
) PURE;
|
||||
|
||||
VIRT UINT32 NICM_STDMETHOD
|
||||
(Release) (
|
||||
IN THISPTRONLY
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(QuerySecureInterface) (
|
||||
IN THISPTR
|
||||
IN HMODULE hModule,
|
||||
IN const GUID *pIId,
|
||||
OUT void **ppvObj
|
||||
) PURE;
|
||||
};
|
||||
|
||||
typedef IVerifiedAccessSS FAR *PIVerifiedAccessSS;
|
||||
|
||||
|
||||
#undef NICM_INTERFACE
|
||||
#define NICM_INTERFACE ISecretStore
|
||||
|
||||
NICM_DECLARE_INHERITTED_INTERFACE(ISecretStore, NICM_IUnknown)
|
||||
{
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(QueryInterface) (
|
||||
IN THISPTR
|
||||
IN const GUID *pIId,
|
||||
OUT void **ppvObj
|
||||
) PURE;
|
||||
|
||||
VIRT UINT32 NICM_STDMETHOD
|
||||
(AddRef) (
|
||||
IN THISPTRONLY
|
||||
) PURE;
|
||||
|
||||
VIRT UINT32 NICM_STDMETHOD
|
||||
(Release) (
|
||||
IN THISPTRONLY
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheOpenSecretStore)
|
||||
(
|
||||
IN THISPTR
|
||||
IN PVOID secretStoreID,
|
||||
IN ULONG ssFlags,
|
||||
OUT PVOID ssHandle,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheCloseSecretStore)
|
||||
(
|
||||
IN THISPTR
|
||||
IN PVOID ssHandle,
|
||||
IN ULONG ssFlags,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheRemoveSecretStore)
|
||||
(
|
||||
IN THISPTR
|
||||
IN PVOID ssHandle,
|
||||
IN ULONG ssFlags,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheRemoveSecret) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN SSCS_SECRET_ID_T *secretID,
|
||||
IN SSCS_PASSWORD_T *epPassword,
|
||||
IN PVOID reserved
|
||||
) PURE;
|
||||
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheReadSecret) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN SSCS_SECRET_ID_T *secretID,
|
||||
IN OUT SSCS_SECRET_T *secretData,
|
||||
IN SSCS_PASSWORD_T *epPassword,
|
||||
IN OUT void *bytesRequired,
|
||||
IN OUT void *reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheWriteSecret) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN SSCS_SECRET_ID_T *secretID,
|
||||
IN SSCS_SECRET_T *secretData,
|
||||
IN SSCS_PASSWORD_T *epPassword,
|
||||
IN void *reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheEnumerateSecretIDs) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN SSCS_SRCH_KEY_T *searchKey,
|
||||
IN OUT SSCS_SECRET_ID_LIST_T *secretIDList,
|
||||
IN OUT VOID *reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheEnumerateKeyChainIDs) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssflags,
|
||||
IN SSCS_SRCH_KEY_T *searchKey,
|
||||
IN OUT SSCS_KEYCHAIN_ID_LIST_T *kcIDList,
|
||||
IN OUT VOID *reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheAddKeyChain) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheRemoveKeyChain) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheGetSecretStoreInfo) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_SECRETSTORE_INFO_T *ssInfo,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(CacheGetKeychainInfo) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_KEYCHAIN_ID_T *keyChainID,
|
||||
IN SSCS_KEYCHAIN_INFO_T *kcInfo,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(LockCache ) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
|
||||
VIRT NCSTATUS NICM_STDMETHOD
|
||||
(UnLockCache ) (
|
||||
IN THISPTR
|
||||
IN SCHANDLE hSC,
|
||||
IN ULONG ssFlags,
|
||||
IN SSCS_PASSCODE_T *passcode,
|
||||
IN OUT PVOID reserved
|
||||
) PURE;
|
||||
};
|
||||
|
||||
typedef ISecretStore FAR *PISecretStore;
|
||||
|
||||
#endif // _SECRETSTOREDEF_
|
||||
|
||||
//=========================================================================
|
||||
//=========================================================================
|
||||
|
||||
Reference in New Issue
Block a user