Skip to main content

X509Signer_CreateDataSignature

Valid for: CANoe DE • CANoe4SW DE

Method Syntax

dword X509Signer_CreateDataSignature(qword objectHandle, byte[] dataToBeSigned, dword dataToBeSignedLength, byte[] outBuffer, dword outBufferLength)

Description

Creation function for signature for arbitrary data using the signers private key and the algorithm from signers certificate subject key algorithm. Signer will use the hash function provided at the signer creation or the one associated with the signing algorithm of this signer. Signature algorithm is used from the Public Key Algorithm Identifier of the associated signer certificate.

Parameters

  • objectHandle: (in) Handle with type ‘X509Signer’. The function will be called in context of this handle.

Selectors

Return Values

  • 1: NoError: Operation was completed successfully.
  • -2: Nullpointer: Error, the return value of the function was “NULL”. The value is not available and the output buffer is unchanged.
  • -3: BufferTooSmall: Error, the output buffer is too small. No value has been written.
  • -4: InvalidHandle: Error, the provided objectHandle is invalid or not suitable for this function.
  • -5: InvalidArgument: Error, one or more arguments are invalid for this function.
  • -6: InvalidArgumentHandle: Error, one or more argument handles are invalid or not suitable for this function.

Example