Skip to main content
Open topic with navigation

X509Signer_CreateCertificateSignature

CAPL Functions » Security » X509Signer_CreateCertificateSignature Valid for: CANoe DE • CANoe4SW DE

Method Syntax

dword X509Signer_CreateCertificateSignature(qword objectHandle, qword certificateHandle, byte[] outBuffer, dword outBufferLength)

Description

Creation function for signature for a certificate using the signers private key and the algorithm from signers certificate subject key algorithm. The To Be Signed Certificate will be signed independent from the validity of the certificate content and certificate structure (i.e. invalid certificate structures can receive a valid signature for testing). The certificate will not be updated, only the signature will be returned for manual updates or other use cases. 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