Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

[BUG] ALPN implementation issue #3516

@vvelciu

Description

@vvelciu

Describe the bug
SOCKETS_SetSockOpt with SOCKETS_SO_ALPN_PROTOCOLS option expects ALPN protocols to be provided as an array of char pointers.
However, this is misused in the transport_secure_sockets.c file in the tlsSetup() implementation:
image
Also, the mqtt_demo_mutual_auth, greengrass_discovery, ota demos configure the pAlpnProtos field as NULL (AWS_IOT_MQTT_ALPN and AWS_IOT_MQTT_ALPN_LENGTH macros are defined but left unused) and it would be nice to be properly set when the MQTT broker port is configured as 443.

System information

  • Project/Demo: mqtt_demo_mutual_auth

Expected behavior
Proper usage of SOCKETS_SetSockOpt, e.g.:
image

Screenshots or console output
The result of using pAlpnProtos similar to mqtt_demo_helpers.c implementation:
image

Steps to reproduce bug

  1. mqtt_demo_mutual_auth demo with port 443 configured as MQTT broker port
  2. Update prvConnectToServerWithBackoffRetries in mqtt_demo_mutual_auth.c file to configure pAlpnProtos (similar to mqtt_demo_helpers.c implementation):
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions