Skip to main content

X509ObjectFactory_createX509CertificateFromCsr

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

Method Syntax

dword X509ObjectFactory_createX509CertificateFromCsr(qword objectHandle, qword& outHandleCertificate, qword csrHandle)

Description

Creation function for new certificate handle with content copied from PKCS#10 Certificate Signing Request. All available content will be copied to the new certificate structure. The result will not be a complete certificate since it lacks signature, serial number, issuer etc. These fields need to be updated manually via setter (X509Certificate_SetIssuer, …) or automatically by using X509Signer_UpdateAndSignCertificate which automatically updates all relevant fields (except serial number).

Parameters

  • objectHandle: (in) Handle with type ‘X509ObjectFactory’. 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