diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-22 16:10:39 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-22 16:10:39 +0200 |
commit | 430a041c2ce117282a5ef660b65d0a81f61c00b7 (patch) | |
tree | eb030b29d0b1017e671f1633fbcd5a9c4b8d5a9f /src/coap/qcoapprotocol_p.h | |
parent | d2744ade327fe6b63bb80d6acd9c1cd7ae6e317f (diff) |
Add a method for setting the minimum token size
For security reasons it is recommended to use tokens with a length of
at least 4 bytes. Added a method for setting the minimum token size and
changed it to be 4 by default.
Change-Id: Ib589b338df8e59ccaf24dceab6691f92d92f861c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/coap/qcoapprotocol_p.h')
-rw-r--r-- | src/coap/qcoapprotocol_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/coap/qcoapprotocol_p.h b/src/coap/qcoapprotocol_p.h index b24363e..4a7c61e 100644 --- a/src/coap/qcoapprotocol_p.h +++ b/src/coap/qcoapprotocol_p.h @@ -90,6 +90,7 @@ public: Q_INVOKABLE void setMaximumRetransmitCount(uint maximumRetransmitCount); Q_INVOKABLE void setBlockSize(quint16 blockSize); Q_INVOKABLE void setMaximumServerResponseDelay(uint responseDelay); + Q_INVOKABLE void setMinumumTokenSize(int tokenSize); private: Q_INVOKABLE void sendRequest(QPointer<QCoapReply> reply, QCoapConnection *connection); @@ -161,6 +162,7 @@ public: uint maximumRetransmitCount = 4; uint ackTimeout = 2000; uint maximumServerResponseDelay = 250 * 1000; + int minimumTokenSize = 4; double ackRandomFactor = 1.5; Q_DECLARE_PUBLIC(QCoapProtocol) |