]>
git.ipfire.org Git - thirdparty/openssl.git/blob - util/perl/TLSProxy/NewSessionTicket.pm
1 # Copyright 2016-2024 The OpenSSL Project Authors. All Rights Reserved.
3 # Licensed under the Apache License 2.0 (the "License"). You may not use
4 # this file except in compliance with the License. You can obtain a copy
5 # in the file LICENSE in the source distribution or at
6 # https://www.openssl.org/source/license.html
10 package TLSProxy
::NewSessionTicket
;
13 push @ISA, 'TLSProxy::Message';
26 $message_frag_lens) = @_;
49 $message_frag_lens) = @_;
74 $message_frag_lens) = @_;
76 my $self = $class->SUPER::new
(
79 TLSProxy
::Message
::MT_NEW_SESSION_TICKET
,
88 $self->{ticket_lifetime_hint
} = 0;
98 my $ticket_lifetime_hint = unpack('N', $self->data);
99 my $ticket_len = unpack('n', $self->data);
100 my $ticket = substr($self->data, 6, $ticket_len);
102 $self->ticket_lifetime_hint($ticket_lifetime_hint);
103 $self->ticket($ticket);
107 #Reconstruct the on-the-wire message data following changes
108 sub set_message_contents
113 $data = pack('N', $self->ticket_lifetime_hint);
114 $data .= pack('n', length($self->ticket));
115 $data .= $self->ticket;
120 #Read/write accessors
121 sub ticket_lifetime_hint
125 $self->{ticket_lifetime_hint
} = shift;
127 return $self->{ticket_lifetime_hint
};
133 $self->{ticket
} = shift;
135 return $self->{ticket
};