📄 browsertoken.h
字号:
/* Copyright 2003-2005, Voltage Security, all rights reserved.
*/
#ifndef _BROWSER_TOKEN_H_
#define _BROWSER_TOKEN_H_
#include "vibe.h"
#include "libctx.h"
#include "icserver.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The struct to record if a storage location has
* received the keys and certs or not.
*/
struct location_status
{
unsigned char *path;
unsigned int requestStatus;
struct location_status *next;
} ;
typedef struct location_status StorageStatus;
/* The values of status of a request.
*/
#define STORAGE_STATUS_COMPLETED 1000
#define STORAGE_STATUS_PENDING 2000
#define STORAGE_STATUS_FAILED 3000
/* This function tells if a client request is pending for a given identity by lokking
* into ActiveEnrollments directory of the client.
*/
int isClientRequestPending (
VtLibCtx libCtx, VtStorageCtx storageCtx, VtIdentityObject idObj, int *result);
/* This function fulfills the client requests if there is a pending client request
* for a given identity
*/
int FulfillClientRequests (
VtLibCtx libCtx, VtMpIntCtx mpIntCtx, VtStorageCtx storageCtx,
VtTransportCtx transportCtx, VtIdentityObject idObj,
icServerResponseData *response);
/* This function deletes the client request file so that it doesn't show up
* as pending next time.
*/
void DeleteClientRequestFile (
VtLibCtx libCtx, VtStorageCtx storageCtx, VtIdentityObject idObj);
/* Free the icServerResponseData struct after we are done with it
*/
void FreeResponseData (
icServerResponseData *responseData, VoltLibCtx *libCtx) ;
/* Initialize all teh fields to zero or NULL
*/
void InitializeResponseData (
icServerResponseData *responseData, VoltLibCtx *libCtx ) ;
/* Add a given location to the list of locations for which token handler
* has already attempted downloading keys and certs
*/
int AddLocationToCompletedList (
StorageStatus **storeList, unsigned char *location, int status);
/* Tells if token handler has alreay attempted or sucessfully downloaded
* the keys and certs for a given location
*/
int GetRequestStatusForLocation (
StorageStatus *storeList, unsigned char *location);
/* Free the location list after we are done
*/
void FreeCompletedLocationList (StorageStatus *storeList);
#ifdef __cplusplus
}
#endif
#endif //_BROWSER_TOKEN_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -