CmpTlsCreateContext (FUN)

FUNCTION CmpTlsCreateContext : RTS_IEC_HANDLE

This function create a TLS context. This context is needed to perform TLS communication using the SysSocket2 library. The context contains all informaiton how to handle this TLS connection.

InOut:

Scope

Name

Type

Initial

Comment

Return

CmpTlsCreateContext

RTS_IEC_HANDLE

Handle to the new accepted socket or RTS_INVALID_HANDLE if failed.

Input

hCert

RTS_IEC_HANDLE

RTS_INVALID_HANDLE

Handle to a certificate. The private key of this certificate has to be available. Can be RTS_INVALID_HANDLE for client connections. If the server requires a client certificate the connection will fail in these case.

tlsMethod

CmpTls_Interfaces.CmpTlsMethod

Protocol version and role in the communication. TLS1.2 is suggested for new implementations. Default will be TLS1.2 client.

cipherList

POINTER TO STRING

0

Allowed chipers used by this connection. Leave 0 to get default. Default will result in ciphers with HIGH encryption strength and Diffie Hellman key exchange.

verifyMode

DWORD

Set up how to verify the peer. The settings differ between client and server. See CmpTlsVerifyMode for details. Default results in: Client -> Verify the peer. Server -> Do not Verify Peer The options of CmpTlsConstans can be combined by adding them.

pResult

POINTER TO RTS_IEC_RESULT

Operations Result