/*----------------------------------------------------------------------- * File: CALLOUTS.C * * Copyright (c) 1995-2000 Intel Corporation. All rights reserved. *----------------------------------------------------------------------- */ /* * This file contains the code used for self-check. */ #include "precomp.h" #ifdef ISL_INCLUDED #include "appselfkey.h" #include /* #include #include */ #include #include "desguid.h" #define MAX_CERTS 5 #define SECTION "des3" CSSM_GUID des3_ex_guid = des3_ex_guid_init; /*--------------------------------------------------------------- * *Name: EISL_RetrieveSelfCheckSectionName * *Description: * sets the slefcheck section name in the manifest * This name has to be set by all modules by defining a global string * *Parameters: * ISL_CALLOUT_DATA* * *Returns: * None * *----------------------------------------------------------------*/ void EISL_RetrieveSelfCheckSectionName( ISL_CALLOUT_DATA *Name){ long len = strlen(SECTION); if( len < Name->length ) { Name->length = len; memcpy(Name->value, SECTION, Name->length+1); } else { Name->length = 0; } } /*--------------------------------------------------------------- * *Name: EISL_RetrieveSelfCheckCredentials * *Description: * Retrieves credential name for the module * *Parameters: * ISL_CALLOUT_DATA* * *Returns: * None * *----------------------------------------------------------------*/ void EISL_RetrieveSelfCheckCredentials( ISL_CALLOUT_DATA *Name, ISL_CALLOUT_DATA *Path){ CSSM_DATA Credential; CSSM_DATA ModulePath; if (mdsutil_GetModuleCredentialInfo (&des3_ex_guid, &Credential, NULL, &ModulePath) == CSSM_OK) { port_memcpy (Name->value, Credential.Data, Credential.Length); Name->length = Credential.Length; port_memcpy (Path->value, ModulePath.Data, ModulePath.Length); Path->length = ModulePath.Length; local_free (Credential.Data, NULL); local_free (ModulePath.Data, NULL); } } void EISL_RetrieveSelfCheckCredentialsSize( uint32 *Size ){ CSSM_DATA Credential; CSSM_DATA ModulePath; if (mdsutil_GetModuleCredentialInfo (&des3_ex_guid, &Credential, NULL, &ModulePath) == CSSM_OK) { if (Size) *Size = Credential.Length; local_free (Credential.Data, NULL); local_free (ModulePath.Data, NULL); } } #endif