Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::SecurityAccess Class Reference

A class to evaluate the security access to the data among diagnostic services. More...

#include <security_access.h>

Inheritance diagram for ara::diag::SecurityAccess:
ara::diag::routing::RoutableUdsService

Public Member Functions

 SecurityAccess (const core::InstanceSpecifier &specifier, ReentrancyType reentrancyType) noexcept
 Constructor. More...
 
std::future< OperationOutputHandleMessage (const std::vector< uint8_t > &requestData, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler) override
 Handle an UDS request message. More...
 
std::future< std::vector< uint8_t > > GetSeed (uint8_t subFunction, std::vector< uint8_t > securityAccessDataRecord, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
 Request a seed from the client side to provide a security key. More...
 
std::future< KeyCompareResultTypeCompareKey (uint8_t subFunction, std::vector< uint8_t > key, MetaInfo &metaInfo, CancellationHandler &&cancellationHandler)
 Evaluate the key provided by a client. More...
 
- Public Member Functions inherited from ara::diag::routing::RoutableUdsService
uint8_t GetSid () const noexcept
 Get SID. More...
 
ara::core::Result< void > Offer ()
 Offer handling DM requests. More...
 
bool IsOffered () const noexcept
 Get offering status of the service. More...
 
void StopOffer () noexcept
 Stop offering request handling.
 

Additional Inherited Members

- Static Public Attributes inherited from ara::diag::routing::RoutableUdsService
static const uint8_t cNegativeResponseCodeSid {0x7f}
 Negative response code service ID.
 
- Protected Member Functions inherited from ara::diag::routing::RoutableUdsService
 RoutableUdsService (const ara::core::InstanceSpecifier &specifier, uint8_t sid) noexcept
 Constructor. More...
 
void GenerateNegativeResponse (OperationOutput &response, uint8_t nrc) const
 Generate a negative response with a specific NRC. More...
 
template<class T >
bool TryExtractValue (MetaInfo &metaInfo, std::string key, T &value) const
 Try to extract a value from the given meta-info. More...
 
- Protected Attributes inherited from ara::diag::routing::RoutableUdsService
const uint8_t cSubFunctionNotSupported {0x12}
 Unsupported sub-function NRC.
 
const uint8_t cIncorrectMessageLength {0x13}
 Incorrect message length NRC.
 
const uint8_t cRequestSequenceError {0x24}
 Incorrect request sequence NRC.
 
- Static Protected Attributes inherited from ara::diag::routing::RoutableUdsService
static const uint8_t cPositiveResponseSidIncrement {0x40}
 SID increment for a positive response.
 

Detailed Description

A class to evaluate the security access to the data among diagnostic services.

Note
In contrast with the ARA standard, the class is NOT abstract.

Constructor & Destructor Documentation

◆ SecurityAccess()

ara::diag::SecurityAccess::SecurityAccess ( const core::InstanceSpecifier specifier,
ReentrancyType  reentrancyType 
)
explicitnoexcept

Constructor.

Parameters
specifierOwner instance specifier
reentrancyTypeService reentrancy type

Member Function Documentation

◆ CompareKey()

std::future< KeyCompareResultType > ara::diag::SecurityAccess::CompareKey ( uint8_t  subFunction,
std::vector< uint8_t >  key,
MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)

Evaluate the key provided by a client.

Parameters
subFunctionSecurity level sub-function
keyProvided key
metaInfoRequest message metainfo
cancellationHandlerCallback to be invoked when the current conversation is cancelled
Returns
Key evaluation result from the server

◆ GetSeed()

std::future< std::vector< uint8_t > > ara::diag::SecurityAccess::GetSeed ( uint8_t  subFunction,
std::vector< uint8_t >  securityAccessDataRecord,
MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)

Request a seed from the client side to provide a security key.

Parameters
subFunctionSecurity level sub-function
securityAccessDataRecordSeed request parameters payload
metaInfoRequest message metainfo
cancellationHandlerCallback to be invoked when the current conversation is cancelled
Returns
Provided key by the server

◆ HandleMessage()

std::future< OperationOutput > ara::diag::SecurityAccess::HandleMessage ( const std::vector< uint8_t > &  requestData,
MetaInfo metaInfo,
CancellationHandler &&  cancellationHandler 
)
overridevirtual

Handle an UDS request message.

Parameters
requestDataRequest message byte array
metaInfoRequest message metainfo
cancellationHandlerCallback to be invoked when the current conversation is cancelled
Returns
Response byte array

Implements ara::diag::routing::RoutableUdsService.