Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84273

QtCoAP uses DTLS 1.0 although the latest OpenSSL is installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Fixed
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: CoAP
    • Labels:
      None

      Description

      I want to write a small app to control my IKEA Tradfri LightBulbs. Just for fun. But the following code snippet uses DTLS version 1.0 instead of 1.2 (see attached Wireshark Screenshot).

      The consequence is following error message:
      qt.coap.connection: Handshake error: "Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten: error:14102410:SSL routines:dtls1_read_bytes:sslv3 alert handshake failure"

          m_coapClient = new QCoapClient(QtCoap::SecurityMode::PreSharedKey, this);
          QCoapSecurityConfiguration configuration;
          configuration.setPreSharedKeyIdentity("Client_identity");
          configuration.setPreSharedKey("xxxxxxxxxxxxx");
          m_configuration = configuration;
          m_coapClient->setSecurityConfiguration(m_configuration);
      
          QCoapRequest request;
          QUrl url;
          url.setHost("192.168.10.94");
          url.setPort(5684);
          url.setPath("/15011/9063");
          request.setUrl(url);
          request.setPayload("{\"9090\":\"frime\"}");
          m_coapClient->post(request);
      

      OS: Ubuntu 20.04 LTS
      Qt: 5.14.2
      QSslSocket::sslLibraryBuildVersionString() returns OpenSSL 1.1.1f 31 Mar 2020

      Forum discussion: https://forum.qt.io/topic/114880/qtcoap-psk-put-request-to-ikea-tradfri-bridge-doesn-t-work-strange-ssl-errors

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            sonakur Sona Kurazyan
            Reporter:
            friedemann Friedemann Metzger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes