X509CertCreateSelfSigned (FUN)

FUNCTION X509CertCreateSelfSigned : RTS_IEC_HANDLE

Create a new self signed certificate. A private key is generated and automatically stored.

InOut:

Scope

Name

Type

Comment

Return

X509CertCreateSelfSigned

RTS_IEC_HANDLE

Input

hCertStore

RTS_IEC_HANDLE

Handle to the certificate store

hBackend

RTS_IEC_HANDLE

Handle to the back-end where to store the generated certificate. RTS_INVALID_HANDLE should be used if no back- end is specified.

pCertInfo

POINTER TO RtsX509CertInfo

Information of the certificate to be generated.

ui32KeySize

UDINT

Size in bits of the private key.

pResult

POINTER TO RTS_IEC_RESULT

Result of the operation.
  • ERR_OK: Everything went fine.

  • ERR_INVALID_HANDLE: Some input handle is invalid.

  • ERR_PARAMETER: Some input parameter is invalid.

  • ERR_OVERFLOW: The timestamps of the certificate would overflow.

  • ERR_NOMEMORY: Not enough memory to perform this operation.

  • ERR_FAILED: Creation of self signed certificate failed. failed