integapi.h
来自「Next BIOS Source code : Extensible Firmw」· C头文件 代码 · 共 427 行 · 第 1/2 页
H
427 行
ISL_SIG_SECTION_GROUP_PTR SignedObjectInfoPtr);
} ISL_SIG_SECTION_METHODS;
/*
** ISL_SIGNATURE_CONTEXT class public methods
*/
typedef struct isl_signature_methods{
ISL_SERVICE_CLASS_METHODS ServiceMethods;
/* class methods */
ISL_SIZE (*SizeofObject)(); /* returns sizeof object */
/* object methods */
ISL_STATUS (*InitializeFromImage)( /* constructor for existing archive */
ISL_SIGNATURE_CONTEXT *Context, /* memory allocated for this instance */
ISL_CONFIG *ConfigContext, /* my algorithm<->code extension configuration */
ISL_MEMORY_CONTEXT_PTR Memory, /* archive which contains signature */
ISL_CONST_DATA Name, /* disk file of external representation */
ISL_CONST_DATA Image); /* image of external representation */
ISL_SIGNER_CONTEXT_PTR (*FindSigner)(
ISL_SIGNATURE_CONTEXT *Context,
ISL_CERTIFICATE *Certificate);
ISL_SIGNER_GROUP_PTR (*GetSignerGroup)(
ISL_SIGNATURE_CONTEXT *Context);
ISL_STATUS (*FreeSignerGroup)(
ISL_SIGNATURE_CONTEXT *Context,
ISL_SIGNER_GROUP_PTR SignerGroupPtr);
ISL_CERTIFICATE_GROUP_PTR (*GetCertificateGroup)(
ISL_SIGNATURE_CONTEXT *Context);
ISL_STATUS (*FreeCertificateGroup)(
ISL_SIGNATURE_CONTEXT *Context,
ISL_CERTIFICATE_GROUP_PTR CertificatePtr);
} ISL_SIGNATURE_METHODS;
/*
** Signer Class
*/
typedef struct isl_signer_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
ISL_STATUS (*GetSignerID)(
ISL_SIGNER_CONTEXT_PTR Context, /* signer context */
ISL_CONST_DATA *SignerID); /* updated issuer and serial number */
ISL_STATUS (*VerifyUsingCert)(
ISL_SIGNER_CONTEXT_PTR Context, /* signer context */
ISL_CERTIFICATE_METHODS *CertMethods, /* configuration methods for certificate format */
ISL_CERTIFICATE *Cert); /* the certificate */
ISL_CERTIFICATE *(*FindSignerCertificate)( /* return found object or NULL */
ISL_SIGNER_CONTEXT_PTR Context);
ISL_STATUS (*GetSignature)(
ISL_SIGNER_CONTEXT_PTR Context,
ISL_CONST_DATA *Signature);
} ISL_SIGNER_METHODS;
/*
** Signable Object (Manifest Section) Class
*/
typedef struct isl_manifest_section_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
/* class methods */
ISL_SIZE (*SizeofObject)(); /* returns sizeof object */
/* object methods */
ISL_STATUS (*Verify)(
ISL_MANIFEST_SECTION_PTR Context); /* context */
ISL_STATUS (*FindAttributeValue)( /* find metadata in section */
ISL_MANIFEST_SECTION_PTR Context, /* archive context */
ISL_CONST_DATA Attribute, /* attribute "name" */
ISL_CONST_DATA_PTR Value); /* fill in Value and Length if found */
ISL_ATTRIBUTE_GROUP_PTR (*GetAttributeGroup)(
ISL_MANIFEST_SECTION_PTR Context);
ISL_STATUS (*FreeAttributeGroup)(
ISL_MANIFEST_SECTION_PTR Context,
ISL_ATTRIBUTE_GROUP_PTR AttributeInfoPtr);
} ISL_MANIFEST_SECTION_METHODS;
typedef struct isl_signed_section_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
/* class methods */
ISL_SIZE (*SizeofObject)(); /* returns sizeof object */
/* object methods */
ISL_STATUS (*Verify)(
ISL_SIG_SECTION_PTR Context); /* context */
ISL_MANIFEST_SECTION_PTR (*GetManifestSection)(
ISL_SIG_SECTION_PTR Context);
ISL_STATUS (*FindAttributeValue)( /* find metadata in section */
ISL_SIG_SECTION_PTR Context, /* archive context */
ISL_CONST_DATA Attribute, /* attribute "name" */
ISL_CONST_DATA_PTR Value); /* fill in Value and Length if found */
ISL_ATTRIBUTE_GROUP_PTR (*GetAttributeGroup)(
ISL_SIG_SECTION_PTR Context);
ISL_STATUS (*FreeAttributeGroup)(
ISL_SIG_SECTION_PTR Context,
ISL_ATTRIBUTE_GROUP_PTR AttributeInfoPtr);
} ISL_SIGNED_SECTION_METHODS;
/*
** Certificate object methods
*/
typedef struct isl_certificate_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
/* class methods */
ISL_SIZE (*SizeofObject)(); /* returns sizeof object */
/* object methods */
ISL_STATUS (*Initialize)(
ISL_CERTIFICATE *ContextPtr, /* memory for internal rep of cert */
ISL_MEMORY_CONTEXT_PTR MemoryPtr, /* memory allocation methods */
ISL_CONST_DATA Cert); /* external rep of certificate */
ISL_STATUS (*Recycle)(
ISL_CERTIFICATE *Cert);
ISL_STATUS (*GetID)(
ISL_CERTIFICATE *Cert,
ISL_CONST_DATA_PTR SignerID);
ISL_STATUS (*GetKey)(
ISL_CERTIFICATE *Cert,
ISL_KEY_BLOCK_PTR Key);
ISL_STATUS (*GetAlgID)(
ISL_CERTIFICATE *Cert,
ISL_CONST_DATA *AlgID);
ISL_STATUS (*Flatten)(
ISL_CERTIFICATE *Cert,
ISL_CONST_DATA *theCert);
} ISL_CERTIFICATE_METHODS;
/*
** Integrity Service Provider Interfaces
** Each service provider may be specific to a signature format, archive format, etc.
*/
/*
** get signed data service
*/
typedef struct isl_get_data_methods{
ISL_SERVICE_CLASS_METHODS ServiceMethods;
ISL_SIZE (*SizeofObject)();
ISL_STATUS (*Initialize)(
ISL_GET_DATA_SERVICE_CONTEXT *Memory,
ISL_CONST_DATA Parameters); /* archive-specific-encoded parameters */
// void *ClassContext, /* class context */
// ISL_MANIFEST_SECTION_PTR *Section); /* manifest section, if any */
ISL_ERROR_CODE (*Update)(
ISL_GET_DATA_SERVICE_CONTEXT *Context,
ISL_CONST_DATA_PTR Data); /* location, length of data returned */
ISL_ERROR_CODE (*Recycle)(
ISL_GET_DATA_SERVICE_CONTEXT *Context);
ISL_STATUS (*InitializeWithClass)(
ISL_GET_DATA_SERVICE_CONTEXT *Memory,
ISL_CONST_DATA Parameters, /* archive-specific-encoded parameters */
ISL_CLASS_PTR Class, /* class structure */
ISL_MANIFEST_SECTION_PTR Section); /* manifest section, if any */
} ISL_GET_DATA_METHODS;
/*
** digest function service
*/
typedef struct isl_digest_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
CSSM_CSP_HANDLE CSPHandle;
uint32 AlgorithmID;
} ISL_DIGEST_METHODS;
/*
** signature service: digest encrypt/decrypt, no context
*/
typedef struct isl_sign_verify_methods {
ISL_SERVICE_CLASS_METHODS ServiceMethods;
CSSM_CSP_HANDLE CSPHandle;
uint32 AlgorithmID;
} ISL_SIGN_VERIFY_METHODS;
void ISL_SetError(uint32 ErrCode);
uint32 ISL_GetError();
#endif /* ifndef ISL_API_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?