FB_SocketTlsSettingsClass

FB_SocketTlsSettingsClass 1:

The FB_SocketTlsSettingsClass function block is used to configure the TLS (Transport Layer Security) communication layer. TLS enables secure IEC 61850 client-server communication.

Namespace: Tc3_Sockets
Library: Tc3_Sockets (Tc3_Sockets.compiled-library)

Inheritance hierarchy

FB_SocketTlsSettingsClass

FUNCTION_BLOCK FB_SocketTlsSettingsClass IMPLEMENTS I_SocketTlsSettingsClass

FB_SocketTlsSettingsClass 2: Interfaces

Type

Description

I_SocketTlsSettingsClass

TLS configuration interface

FB_SocketTlsSettingsClass 3: Methods

Name

Description

AddCa

Saves the file path of the CA certificate in the TLS configuration settings

AddCert

Saves the file path of the client or server certificate in the TLS configuration settings

AddCrl

Saves the file path of the Certificate Revocation List (CRL) in the TLS configuration settings

AddPsk

Saves the PSK (pre-shared key) and PSK identity string in the TLS configuration settings

Reset

Resets all TLS configuration settings

SetConnectFlags

Saves additional, optional TLS configuration settings of the client

SetListenFlags

Saves additional, optional TLS configuration settings of the server

FB_SocketTlsSettingsClass 4: Properties

Name

Type

Access

Definition location

Initial value

Description

nSecurePort

UDINT

Get

I_SocketTlsSettingsClass

3782

Secure ISO TP0 (IANA) port number for TLS communication

Set

Local

connectFlags

ST_TlsConnectFlags

Get

I_SocketTlsSettingsClass

DEFAULT_TLSCONNECTFLAGS

Additional TLS configuration settings of the client

listenFlags

ST_TlsListenFlags

Get

I_SocketTlsSettingsClass

DEFAULT_TLSLISTENFLAGS

Additional TLS configuration settings of the server

pskKey

PVOID

Get

I_SocketTlsSettingsClass

0

Points to the first byte of the PSK key

pskKeyLen

UDINT(0..TCPADS_TLS_MAX_PSK_KEY_SIZE)

Get

I_SocketTlsSettingsClass

0

Byte length of the PSK key

sCaPath

STRING(TCPADS_TLS_CERTIFICATE_PATH_SIZE)

Get

I_SocketTlsSettingsClass

''

File path of the CA certificate

sCertPath

STRING(TCPADS_TLS_CERTIFICATE_PATH_SIZE)

Get

I_SocketTlsSettingsClass

''

File path of the client or server certificate

sCrlPath

STRING(TCPADS_TLS_CERTIFICATE_PATH_SIZE)

Get

I_SocketTlsSettingsClass

''

File path of the certificate revocation list (CRL)

sIdentity

STRING(TCPADS_TLS_PSK_IDENTITY_SIZE)

Get

I_SocketTlsSettingsClass

''

Identity string of the PSK key

sKeyPath

STRING(TCPADS_TLS_CERTIFICATE_PATH_SIZE)

Get

I_SocketTlsSettingsClass

''

File path of the private key

sKeyPwd

STRING(TCPADS_TLS_KEY_PASSWORD_SIZE)

Get

I_SocketTlsSettingsClass

''

Password string of the certificate