PubSub: add a callback for Publisher signature failure and Subscriber signature check failure

Description

Add a callback to notify a Publisher signature failure and a callback to notify a Subscriber signature check failure.

Detailed description

Add API to define in PubSub configuration a dedicated callback for each connection.

When Publisher signature fails (keys not available) the dedicated callback is called. When Subscriber signature check fails (keys not available or signature check failure), the dedicated callback is called.

The callback signatures are the following:

typedef void SOPC_Sub_SignatureCheckFailed(const SOPC_ReaderGroup* group, const char* securityGroupId);
typedef void SOPC_Pub_SignatureFailed(const SOPC_WriterGroup* group,
                                      const SOPC_Conf_PublisherId* pubId,
                                      const char* securityGroupId);

Code version identification

86da9715

Security impact

No security impact

Implementation

Modify PubSub configuration module:

  • add callback type definitions
  • add functions to set/get callback on a Pub/Sub connection.

Modify Publisher behavior in publisher scheduler to call the dedicated callback when keys are not available for signature (only possible failure for signing)

Modify Subscriber behavior in network layer to call dedicated callback when keys are not available for signature check or if the verification fails (invalid keys).

Assignee Loading
Time tracking Loading