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

QtCoAP uses DTLS 1.0 although the latest OpenSSL is installed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • None
    • 5.14.2
    • CoAP
    • 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

        1. coap.pcapng
          0.8 kB
          Friedemann Metzger
        2. Screenshot 2020-05-17 at 11.43.14.png
          568 kB
          Friedemann Metzger
        3. Screenshot from 2020-05-18 08-49-20.png
          140 kB
          Sona Kurazyan

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: