Skip to content

Commit 48b512e

Browse files
author
Pavel Siska
committed
WIP
1 parent e80a252 commit 48b512e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/plugins/process/tls/src/tls.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@
1111
*
1212
* SPDX-License-Identifier: BSD-3-Clause
1313
*/
14-
#include "tls.hpp"
15-
1614
#include "md5.hpp"
1715
#include "sha256.hpp"
16+
#include "tls.hpp"
1817

1918
#include <algorithm>
2019
#include <cctype>
@@ -307,9 +306,11 @@ static std::string get_ja4_string(const TLSParser& parser, uint8_t ip_proto)
307306

308307
const char sni_label = parser.get_server_names().empty() ? 'i' : 'd';
309308

310-
const uint8_t ciphers_count = std::min(parser.get_cipher_suits().size(), 99UL);
309+
const auto ciphers_count
310+
= static_cast<uint8_t>(std::min(parser.get_cipher_suits().size(), static_cast<size_t>(99)));
311311

312-
const uint8_t extension_count = std::min(parser.get_extensions().size(), 99UL);
312+
const auto extension_count
313+
= static_cast<uint8_t>(std::min(parser.get_extensions().size(), static_cast<size_t>(99)));
313314

314315
const auto alpn_label = get_alpn_label(parser);
315316

0 commit comments

Comments
 (0)