Skip to content
This repository was archived by the owner on Nov 10, 2021. It is now read-only.
This repository was archived by the owner on Nov 10, 2021. It is now read-only.

Linux SECURE mode simpleclient/simpleserver connection fail(handshake) #21

@fengyunlai

Description

@fengyunlai

Hi everyone,

I found an issue for iotivity-constrained on ubuntu, in port/linux :

make DEBUG=1 SECURE=1

then running the ./simpleserver and ./simpleclient script which are created in port/linux.

ISSUE :
Handshake fail.
Simpleserver:

DEBUG: ../../security/oc_tls.c <read_application_data:876>: oc_tls: Got nonce
DEBUG: ../../security/oc_tls.c <read_application_data:877>: 56 4E 9D 9A 0F DC D1 FA 49 EF A2 E4 C2 C9 62 21 3B 98 91 73 54 97 49 4A 18 2D 34 AB FA 02 4A 7A BF 8A 29 8C 0F B7 B0 E5 0E 52 A8 6E 4E AE 3B F0 8B CC 6E E8 17 46 D8 32 8C FB 3F D2 5F AB 1B BA
ERROR: ../../security/oc_tls.c <read_application_data:894>: oc_tls: mbedtls_error: SSL - A fatal alert message was received from our peer
DEBUG: ../../security/oc_tls.c <oc_tls_free_peer:115>:
oc_tls: removing peer
DEBUG: ../../messaging/coap/observe.c <coap_remove_observer_by_client:179>: Unregistering observers for client at:
DEBUG: ../../messaging/coap/observe.c <coap_remove_observer_by_client:180>: [fe80:0000:0000:0000:0a00:27ff:fe59:8c23]:37360
DEBUG: ../../messaging/coap/observe.c <coap_remove_observer_by_client:191>: Removed 0 observers
mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:7634: => free
mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:7701: <= free
DEBUG: ../../api/oc_buffer.c <oc_message_unref:87>: buffer: freed TX/RX buffer; num free: 6
DEBUG: ../../security/oc_tls.c <read_application_data:855>: oc_tls: In read_application_data
DEBUG: ../../security/oc_tls.c <read_application_data:857>: oc_tls: read_application_data: Peer not active

Simpleclient:

mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:2349: in_left: 25, nb_want: 25
mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:2356: <= fetch input
mbedtls_log: ../../deps/mbedtls/library/ssl_srv.c:1348: dumping 'record contents' (12 bytes)
mbedtls_log: ../../deps/mbedtls/library/ssl_srv.c:1348: 0000: 0e 00 00 00 00 03 00 00 00 00 00 00 ............
mbedtls_log: ../../deps/mbedtls/library/ssl_srv.c:1366: client hello v3, handshake type: 14
mbedtls_log: ../../deps/mbedtls/library/ssl_srv.c:1370: bad client hello message
ERROR: ../../security/oc_tls.c <read_application_data:894>: oc_tls: mbedtls_error: SSL - Processing of the ClientHello handshake message failed
DEBUG: ../../security/oc_tls.c <oc_tls_free_peer:115>:
oc_tls: removing peer
mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:7634: => free
mbedtls_log: ../../deps/mbedtls/library/ssl_tls.c:7701: <= free

The Linux security connection just fail, either for the latest version that after updating to mbedtls 2.7.0, or the old version which needs to apply mbedTLS patches into deps/mbedtls using:
patch -p1 < ../../patches/mbedtls_ocf_patch_1
patch -p1 < ../../patches/mbedtls_iotivity_constrained_patch_2

Is this a real issue? Does Linux simpleclient/simpleserver support SECURE=1 connection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions