• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 5079590438

25 May 2023 12:28PM UTC coverage: 92.228% (+0.5%) from 91.723%
5079590438

Pull #3502

github

Pull Request #3502: Apply clang-format to the codebase

75589 of 81959 relevant lines covered (92.23%)

12139530.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/src/fuzzer/tls_13_handshake_layer.cpp
1
/*
2
* (C) 2022 Jack Lloyd
3
* (C) 2022 René Meusel - neXenio GmbH
4
* (C) 2022 Lukas Zeller - neXenio GmbH
5
*
6
* Botan is released under the Simplified BSD License (see license.txt)
7
*/
8

9
#include "fuzzers.h"
10

11
#include <botan/internal/tls_handshake_layer_13.h>
12
#include <botan/internal/tls_transcript_hash_13.h>
13

14
namespace {
15

16
Botan::TLS::Handshake_Layer prepare(std::span<const uint8_t> data) {
71✔
17
   Botan::TLS::Handshake_Layer hl(Botan::TLS::Connection_Side::Client);
71✔
18
   hl.copy_data(data);
71✔
19
   return hl;
71✔
20
}
×
21

22
}  // namespace;
23

24
void fuzz(const uint8_t in[], size_t len) {
41✔
25
   static Botan::TLS::Default_Policy policy;
41✔
26

27
   try {
41✔
28
      auto hl1 = prepare(std::span(in, len));
41✔
29
      Botan::TLS::Transcript_Hash_State ths("SHA-256");
82✔
30
      while(hl1.next_message(policy, ths).has_value()) {};
108✔
31

32
      auto hl2 = prepare(std::span(in, len));
30✔
33
      while(hl2.next_post_handshake_message(policy).has_value()) {};
30✔
34
   } catch(Botan::Exception& e) {}
82✔
35
}
41✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc