CmpTlsShutdown (FUN) ¶ FUNCTION CmpTlsShutdown : RTS_IEC_RESULT There are two ways to shutdown the TLS connection: bidirectional: The first call of TlsShutdown will send the shutdown message. The operation will return ERR_TLS_RETRY_OPERATION. Then the function has to be called again. If the acknowledge of the peer was received ERR_OK will be returned. If the acknowledge was not received yet the function will return ERR_TLS_WANT_READ. unidirectional: The first call of TlsShutdown will send the shutdown message. The operation will return ERR_TLS_RETRY_OPERATION. Close the IO channel and clean up. Don’t wait for the acknowledge of the peer. InOut: Scope Name Type Comment Return CmpTlsShutdown RTS_IEC_RESULT Result of this operation. May be one of these values: ERR_OK: No error. Everything worked as expected. ERR_NOTINITIALIZED: The TLS component was not initialized proberly. ERR_TLS_CONNECTION_CLOSED: The TLS connection is closed. ERR_TLS_WANT_READ: The operation needs TO read data FROM the IO system. There is no data available. ERR_TLS_WANT_WRITE: The operation needs to write data to the IO system. This is not possible. ERR_TLS_RETRY_OPERATION: Something went wrong. Try the same function call again ERR_TLS_IO_SYSTEM: An error in the unterlaying IO system. ERR_TLS_INTERNAL: An internal Error of the TLS Component ERR_FAILED: Unknown error. Input hTlsConn RTS_IEC_HANDLE Handle of the TLS connection, created with one of the TLSxxxOpen functions
CmpTlsRead (FUN) ¶ FUNCTION CmpTlsRead : __XINT Receive data from the encrypted channel. If the connection is not established yet, this will be done transparent in the background. Normally only data is of the encrypted channel is consumed. In some cases (Handshaking has not finished or renegotiation of the session keys) this function will also write data. If the unterlaying IO doens’t write automatically the need to send data will be indicated using the corresponding error code. InOut: Scope Name Type Comment Return CmpTlsRead __XINT Number of bytes received. 0 if an error occured. Input hTlsConn RTS_IEC_HANDLE Handle of the TLS connection, created with one of the TLSxxxOpen functions pbyBuffer POINTER TO BYTE Pointer to a databuffer, where the received decrypted data should be written to. xiBufferSize __XINT Size of pbyData. Maximum number of bytes, that could be received from the TLS connection. pResult POINTER TO RTS_IEC_RESULT Result OF THIS operation. May be one OF these values: ERR_OK: No error. Everything worked as expected. ERR_NOTINITIALIZED: The TLS component was not initialized proberly. ERR_TLS_CONNECTION_CLOSED: The TLS connection is closed. Use TlsShutdown to shutdown locally. ERR_TLS_WANT_READ: The operation needs TO read data FROM the IO system. There is no data available. ERR_TLS_WANT_WRITE: The operation needs to write data to the IO system. This is not possible. ERR_TLS_RETRY_OPERATION: Something went wrong. Try the same function call again ERR_TLS_IO_SYSTEM: An error in the unterlaying IO system. ERR_TLS_INTERNAL: An internal Error of the TLS Component ERR_FAILED: Unknown error.
CmpTlsWrite (FUN) ¶ FUNCTION CmpTlsWrite : __XINT Send data over the encrypted channel. If the connection is not established yet, this will be done transparent in the background. Normally only data is written to the unterlaying IO. In some cases data have to be read (Handshaking has not finished or renegotiation of the session keys). If not data is for reading is available this will be indicated through the corresponding error code. InOut: Scope Name Type Comment Return CmpTlsWrite __XINT Number of bytes sent. 0 if an error occured. Input hTlsConn RTS_IEC_HANDLE Handle of the TLS connection, created with one of the TLSxxxOpen functions pbyData POINTER TO BYTE Pointer to data, that should be sent over the TLS connection xiDataSize __XINT Size of pbyData. Number of bytes that should be sent over the TLS connection pResult POINTER TO RTS_IEC_RESULT Result OF THIS operation. May be one OF these values: ERR_OK: No error. Everything worked as expected. ERR_NOTINITIALIZED: The TLS component was not initialized proberly. ERR_TLS_CONNECTION_CLOSED: The TLS connection is closed. Use TlsShutdown to shutdown locally. ERR_TLS_WANT_READ: The operation needs TO read data FROM the IO system. There is no data available. ERR_TLS_WANT_WRITE: The operation needs to write data to the IO system. This is not possible. ERR_TLS_RETRY_OPERATION: Something went wrong. Try the same function call again ERR_TLS_IO_SYSTEM: An error in the unterlaying IO system. ERR_TLS_INTERNAL: An internal Error of the TLS Component ERR_FAILED: Unknown error.
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.04.2021, 15:57:07 companyName string 3S-Smart Software Solutions GmbH libraryFile CmpTls Implementation.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile CmpTls Implementation.clean.json version version 2.0.0.0 ProjectInformation IsEndUserLibrary bool False Released True LastModificationDateTime date 20.04.2021, 15:57:07 LibraryCategories library-category-list System|SysLibs Author string CODESYS Development GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Description See: Description DocFormat reStructuredText Placeholder CmpTls Implementation Project CmpTls Implementation Title CmpTls Implementation Version version 3.5.17.0
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CmpCrypto ¶ Library Identification ¶ Placeholder: CmpCrypto Default Resolution: CmpCrypto, * (System) Namespace: CmpCrypto Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpCrypto CmpTls Interfaces ¶ Library Identification ¶ Name: CmpTls Interfaces Version: newest Company: System Namespace: CmpTls_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpTls Interfaces, * (System) SysTypes2 Interfaces ¶ Library Identification ¶ Name: SysTypes2 Interfaces Version: newest Company: System Namespace: SysTypes Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: SysTypes2 Interfaces, * (System)
CmpTls Library Documentation ¶ Company System Title CmpTls Version 3.5.17.0 Categories System|SysLibs Author 3S - Smart Software Solutions GmbH Placeholder CmpTls Description 1 ¶ Library, to manage TLS settings used by different other libraries. Use case: With this library it is possible to create a desired TLS context and set thins up for different use cases. With this library it is possible to establish TLS connection on static buffers. The content of the buffers have to be exchanged by the user of this library. If TCP should be used use SysSocket2 instead. This library offers a socket like interface of the TLS protocol. Indices and tables ¶ 1 Based on CmpTls.library, last modified 20.04.2021, 15:56:50. LibDoc 4.4.0.0-b.27 The content file CmpTls.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 15:56:50.
Library Reference ¶ This is a dictionary of all referenced libraries and their name spaces. CmpTls Implementation ¶ Library Identification ¶ Placeholder: CmpTls Implementation Default Resolution: CmpTls Implementation, * (System) Namespace: CmpTls_Implementation Library Properties ¶ LinkAllContent: False Optional: False PublishSymbolsInContainer: True QualifiedOnly: False SystemLibrary: False Key: CmpTls Implementation CmpTls Interfaces ¶ Library Identification ¶ Name: CmpTls Interfaces Version: newest Company: System Namespace: CmpTls_Interfaces Library Properties ¶ LinkAllContent: False Optional: False QualifiedOnly: False SystemLibrary: False Key: CmpTls Interfaces, * (System)
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 20.04.2021, 15:56:50 companyName string 3S-Smart Software Solutions GmbH libraryFile CmpTls.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile CmpTls.clean.json version version 2.0.0.0 ProjectInformation ActivateSigning bool False IsCommonLibraryContainer True Released True LastModificationDateTime date 20.04.2021, 15:56:50 LibraryCategories library-category-list System|SysLibs Author string `` 3S - Smart Software Solutions GmbH `` Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Description See: Description DocFormat reStructuredText Placeholder CmpTls Project CmpTls Title CmpTls Version version 3.5.17.0
CmpTls Interfaces Library Documentation ¶ Company System Title CmpTls Interfaces Version 3.5.17.0 Categories System|SysLibs Author CODESYS Development GmbH Description 1 ¶ This interface contains common types an error codes related to the CmpTls Implementation library. Contents: ¶ CmpTlsConstants (GVL) CmpTlsMethod (Enum) ERRORS (GVL) IVerifyCertCallback (Interface) VerifyCertCallback (Method) Indices and tables ¶ 1 Based on CmpTls_Itfs.library, last modified 20.04.2021, 15:57:27. LibDoc 4.4.0.0-b.27 The content file CmpTls_Itfs.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 15:57:27.
CmpTlsConstants (GVL) ¶ Attributes: qualified_only InOut: Scope Name Type Initial Comment Constant TLS_VERIFY_NONE DWORD 16#1 Don’t perform a peer verification (Default for server) TLS_VERIFY_PEER DWORD 16#2 Perform a peer verification (Default for client). For Server: Send a client certificate request. If a client certificate is available verify this certificate. TLS_VERIFY_FAIL_IF_NO_PEER_CERT DWORD 16#4 Only for for Server methods. Forces the connection to be terminated if the client does not provide a certificate. Add this to TLS_VERIFY_PERR TLS_VERIFY_CLIENT_ONCE DWORD 16#8 Only for for Server methods. Request the client certificate only whithin the initial handshake. While renegortiation no certificate is requested from the client. Add this to TLS_VERIFY_PERR