Skip to main content

Documentation Index

Fetch the complete documentation index at: https://notevil.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Open topic with navigation CAPL Functions » Ethernet » AUTOSAR Eth IL » AREthTlsAuthenticateAsServerWithConfiguration

AREthTlsAuthenticateAsServerWithConfiguration

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

AREthTlsAuthenticateAsServerWithConfiguration(dword connectionHandle, char configuration[])

Description

Starts the TLS authentication handshake as server. Certificate common names and Pre Shared Key names have to match the entries in the Vector Security Manager TLS configuration. It is possible to copy the TLS configuration name from the security profile.

Parameters

  • connectionHandle: Handle of the TLS socket to be used.
  • configuration: Name of the TLS configuration.

Return Values

  • 0: The function was successfully executed.
  • >0: Error code

Example

dword res;
dword connection;

if (socket == gServerSocket1)
{
    connection = tcpAccept(socket);
    connection = TlsOpen(connection);
    write("%FILE_NAME_NO_EXT%: Server %d connection %d", socket, connection);
    res = tlsAuthenticateAsServerWithConfiguration(connection, "PSK K1");
}
AREthTlsAuthenticateAsClientWithConfigurationOnAREthNewServerAepOnAREthClientAepConnected