Skip to content

Commit

Permalink
Fixup prep
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Feb 24, 2023
1 parent e31e61d commit d16cd63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/tls/msg_session_ticket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ New_Session_Ticket_12::New_Session_Ticket_12(const std::vector<uint8_t>& buf)
namespace {

template <typename lifetime_t = uint32_t>
void store_lifetime(std::span<uint8_t, sizeof(lifetime_t)> sink, std::chrono::seconds lifetime)
void store_lifetime(std::span<uint8_t> sink, std::chrono::seconds lifetime)
{
BOTAN_ARG_CHECK(lifetime.count() >= 0 && lifetime.count() <= std::numeric_limits<lifetime_t>::max(),
"Ticket lifetime is out of range");
Expand Down Expand Up @@ -132,7 +132,7 @@ std::vector<uint8_t> New_Session_Ticket_13::serialize() const
{
std::vector<uint8_t> result(8);

store_lifetime(std::span<uint8_t, 4>{result}, m_ticket_lifetime_hint);
store_lifetime(std::span(result.data(), 4), m_ticket_lifetime_hint);
store_be(m_ticket_age_add, result.data() + 4);
append_tls_length_value(result, m_ticket_nonce.get(), 1);
append_tls_length_value(result, m_handle.get(), 2);
Expand Down

0 comments on commit d16cd63

Please sign in to comment.