FLEX-FORD-OBC-BM/Source/bsw/CryIf/CryIf_Private.h

203 lines
14 KiB
C
Raw Permalink Normal View History

2026-03-19 11:49:16 +01:00
/**********************************************************************************************************************
* COPYRIGHT
* -------------------------------------------------------------------------------------------------------------------
* \verbatim
* Copyright (c) 2025 by Vector Informatik GmbH. All rights reserved.
*
* This software is copyright protected and proprietary to Vector Informatik GmbH.
* Vector Informatik GmbH grants to you only those rights as set out in the license conditions.
* All other rights remain with Vector Informatik GmbH.
* \endverbatim
* -------------------------------------------------------------------------------------------------------------------
* FILE DESCRIPTION
* -----------------------------------------------------------------------------------------------------------------*/
/* \file CryIf_Private.h
* \brief MICROSAR Crypto Interface (CRYIF)
* \details The Crypto Interface module provides a unique interface to manage different Crypto HW and SW
* solutions. This header file contains stub function declarations for services that are not supported
* by the underlying Crypto.
*********************************************************************************************************************/
/**********************************************************************************************************************
* REVISION HISTORY
* -------------------------------------------------------------------------------------------------------------------
* Refer to the module's header file.
*********************************************************************************************************************/
#if !defined (CRYIF_PRIVATE_H)
# define CRYIF_PRIVATE_H
/**********************************************************************************************************************
* INCLUDES
*********************************************************************************************************************/
# include "Std_Types.h"
# include "Crypto_GeneralTypes.h"
/**********************************************************************************************************************
* GLOBAL CONSTANT MACROS
*********************************************************************************************************************/
/**********************************************************************************************************************
* GLOBAL FUNCTION PROTOTYPES
*********************************************************************************************************************/
# define CRYIF_START_SEC_CODE
# include "CryIf_MemMap.h" /* PRQA S 5087 */ /* MD_MSR_MemMap */
/**********************************************************************************************************************
* CryIf_KeyElementCopyPartial_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underyling Crypto Driver does not
* support KeyElementCopyPartial Service. This function should never be called and is only existent to
* overcome Compiler / Linker errors.
* \param[in] cryIfKeyId Holds the identifier of the key whose key element shall be the source
* element.
* \param[in] keyElementId Holds the identifier of the key element which shall be the source for the
* copy operation.
* \param[in] keyElementSourceOffset This is the offset of the source key element indicating the start index
* of the copy operation.
* \param[in] keyElementTargetOffset This is the offset of the destination key element indicating the start index
* of the copy operation.
* \param[in] keyElementCopyLength Specifies the number of bytes that shall be copied.
* \param[in] targetCryIfKeyId Holds the identifier of the key whose key element shall be the destination
* element.
* \param[in] targetKeyElementId Holds the identifier of the key element which shall be the destination for
* the copy operation.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \pre -
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_KeyElementCopyPartial_Stub(uint32 cryIfKeyId,
uint32 keyElementId,
uint32 keyElementSourceOffset,
uint32 keyElementTargetOffset,
uint32 keyElementCopyLength,
uint32 targetCryIfKeyId,
uint32 targetKeyElementId);
/**********************************************************************************************************************
* CryIf_CertificateParse_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underlying Crypto Driver does not
* support CertificateParse Service. This function should never be called and is only existent to
* overcome Compiler / Linker errors.
* \param[in] cryIfKeyId Holds the identifier of the key slot in which the certificate has been
* stored.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \pre -
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_CertificateParse_Stub(uint32 cryIfKeyId);
/**********************************************************************************************************************
* CryIf_CertificateVerify_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underlying Crypto Driver does not
* support CertificateVerify Service. This function should never be called and is only existent to
* overcome Compiler / Linker errors.
* \param[in] cryIfKeyId Holds the identifier of the key which shall be used to validate the
* certificate.
* \param[in] verifyCryIfKeyId Holds the identifier of the key containing the certificate, which shall be
* verified.
* \param[out] verifyPtr Holds a pointer to the memory location which will contain the result of the
* certificate verification.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \pre -
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
* \endspec
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_CertificateVerify_Stub(uint32 cryIfKeyId,
uint32 verifyCryIfKeyId,
P2VAR(Crypto_VerifyResultType, AUTOMATIC, CRYIF_APPL_VAR) verifyPtr);
/**********************************************************************************************************************
* CryIf_KeySetInvalid_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underlying Crypto Driver does not
* support KeySetInvalid Service. This function should never be called and is only existent to overcome
* Compiler / Linker errors.
* \param[in] cryIfKeyId Holds the identifier of the key that shall be invalidated.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
* \pre -
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_KeySetInvalid_Stub(uint32 cryIfKeyId);
/**********************************************************************************************************************
* CryIf_KeyGetStatus_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underlying Crypto Driver does not
* support KeyGetStatus Service. This function should never be called and is only existent to overcome
* Compiler / Linker errors.
* \param[in] cryIfKeyId Holds the identifier of the key whose status shall be returned.
* \param[out] keyStatusPtr Holds a pointer to the memory where the key status shall be written to.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \pre -
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
* \endspec
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_KeyGetStatus_Stub(uint32 cryIfKeyId,
P2VAR(Crypto_KeyStatusType, AUTOMATIC, CRYIF_APPL_VAR) keyStatusPtr);
/**********************************************************************************************************************
* CryIf_CustomSync_Stub()
*********************************************************************************************************************/
/*! \brief Returns E_NOT_OK.
* \details This function is referenced in the crypto functions array if the underlying Crypto Driver does not
* support CustomSync Service. This function should never be called and is only existent to overcome
* Compiler / Linker errors.
* \param[in] dispatchId Unique id to identify the request.
* \param[in] keyId Key Id (e.g. of the key in which the certificate is stored).
* \param[in] keyElementId Key element id.
* \param[in] targetKeyId Holds the target key id.
* If the service does not require a target key Id, pass on
* CRYIF_EMPTY_KEY_ID.
* \param[in] targetKeyElementId Key element id of target key.
* \param[in] inputPtr Pointer to the input data.
* \param[in] inputLength Contains the input length in bytes.
* \param[out] outputPtr Pointer to the output data.
* \param[out] outputLengthPtr Contains the output length in bytes.
* \param[out] secondaryOutputPtr Pointer to the secondary output data.
* \param[out] secondaryOutputLengthPtr Contains the secondary output length in bytes.
* \return E_NOT_OK As this should never be called directly, E_NOT_OK is always returned.
* \pre -
* \context TASK
* \reentrant TRUE
* \synchronous TRUE
*********************************************************************************************************************/
FUNC(Std_ReturnType, CRYIF_CODE) CryIf_CustomSync_Stub(uint32 dispatchId,
uint32 keyId,
uint32 keyElementId,
uint32 targetKeyId,
uint32 targetKeyElementId,
P2CONST(uint8, AUTOMATIC, CRYIF_APPL_DATA) inputPtr,
uint32 inputLength,
P2VAR(uint8, AUTOMATIC, CRYIF_APPL_VAR) outputPtr,
P2VAR(uint32, AUTOMATIC, CRYIF_APPL_VAR) outputLengthPtr,
P2VAR(uint8, AUTOMATIC, CRYIF_APPL_VAR) secondaryOutputPtr,
P2VAR(uint32, AUTOMATIC, CRYIF_APPL_VAR) secondaryOutputLengthPtr);
# define CRYIF_STOP_SEC_CODE
# include "CryIf_MemMap.h" /* PRQA S 5087 */ /* MD_MSR_MemMap */
#endif /* !defined (CRYIF_PRIVATE_H) */
/**********************************************************************************************************************
* END OF FILE: CryIf_Private.h
*********************************************************************************************************************/