Lines Matching refs:self

30     my $self = $class->SUPER::new(
42 $self->{isdtls} = $isdtls;
43 $self->{client_version} = 0;
44 $self->{random} = [];
45 $self->{session_id_len} = 0;
46 $self->{session} = "";
47 $self->{legacy_cookie_len} = 0; #DTLS only
48 $self->{legacy_cookie} = ""; #DTLS only
49 $self->{ciphersuite_len} = 0;
50 $self->{ciphersuites} = [];
51 $self->{comp_meth_len} = 0;
52 $self->{comp_meths} = [];
53 $self->{extensions_len} = 0;
54 $self->{extension_data} = "";
56 return $self;
61 my $self = shift;
63 my ($client_version) = unpack('n', $self->data);
64 my $random = substr($self->data, $ptr, 32);
66 my $session_id_len = unpack('C', substr($self->data, $ptr));
68 my $session = substr($self->data, $ptr, $session_id_len);
72 if($self->{isdtls}) {
73 $legacy_cookie_len = unpack('C', substr($self->data, $ptr));
75 $legacy_cookie = substr($self->data, $ptr, $legacy_cookie_len);
78 my $ciphersuite_len = unpack('n', substr($self->data, $ptr));
80 my @ciphersuites = unpack('n*', substr($self->data, $ptr,
83 my $comp_meth_len = unpack('C', substr($self->data, $ptr));
85 my @comp_meths = unpack('C*', substr($self->data, $ptr, $comp_meth_len));
87 my $extensions_len = unpack('n', substr($self->data, $ptr));
91 my $extension_data = substr($self->data, $ptr);
104 $self->client_version($client_version);
105 $self->random($random);
106 $self->session_id_len($session_id_len);
107 $self->session($session);
108 $self->legacy_cookie_len($legacy_cookie_len);
109 $self->legacy_cookie($legacy_cookie);
110 $self->ciphersuite_len($ciphersuite_len);
111 $self->ciphersuites(\@ciphersuites);
112 $self->comp_meth_len($comp_meth_len);
113 $self->comp_meths(\@comp_meths);
114 $self->extensions_len($extensions_len);
115 $self->extension_data(\%extensions);
117 $self->process_extensions();
121 if($self->{isdtls}) {
132 my $self = shift;
133 my %extensions = %{$self->extension_data};
145 my $self = shift;
149 my $extdata = ${$self->extension_data}{$key};
159 my $self = shift;
163 $data = pack('n', $self->client_version);
164 $data .= $self->random;
165 $data .= pack('C', $self->session_id_len);
166 $data .= $self->session;
167 if($self->{isdtls}){
168 $data .= pack('C', $self->legacy_cookie_len);
169 if($self->legacy_cookie_len > 0) {
170 $data .= $self->legacy_cookie;
173 $data .= pack('n', $self->ciphersuite_len);
174 $data .= pack("n*", @{$self->ciphersuites});
175 $data .= pack('C', $self->comp_meth_len);
176 $data .= pack("C*", @{$self->comp_meths});
178 foreach my $key (keys %{$self->extension_data}) {
180 $extensions .= $self->extension_contents($key);
182 $extensions .= $self->extension_contents($key) if ($key == $self->dupext);
185 if (defined ${$self->extension_data}{TLSProxy::Message::EXT_PSK}) {
186 $extensions .= $self->extension_contents(TLSProxy::Message::EXT_PSK);
189 if (defined ${$self->extension_data}{TLSProxy::Message::EXT_FORCE_LAST}) {
190 $extensions .= $self->extension_contents(TLSProxy::Message::EXT_FORCE_LAST);
196 $self->data($data);
202 my $self = shift;
204 $self->{client_version} = shift;
206 return $self->{client_version};
210 my $self = shift;
212 $self->{random} = shift;
214 return $self->{random};
218 my $self = shift;
220 $self->{session_id_len} = shift;
222 return $self->{session_id_len};
226 my $self = shift;
228 $self->{session} = shift;
230 return $self->{session};
234 my $self = shift;
236 $self->{legacy_cookie_len} = shift;
238 return $self->{legacy_cookie_len};
242 my $self = shift;
244 $self->{legacy_cookie} = shift;
246 return $self->{legacy_cookie};
250 my $self = shift;
252 $self->{ciphersuite_len} = shift;
254 return $self->{ciphersuite_len};
258 my $self = shift;
260 $self->{ciphersuites} = shift;
262 return $self->{ciphersuites};
266 my $self = shift;
268 $self->{comp_meth_len} = shift;
270 return $self->{comp_meth_len};
274 my $self = shift;
276 $self->{comp_meths} = shift;
278 return $self->{comp_meths};
282 my $self = shift;
284 $self->{extensions_len} = shift;
286 return $self->{extensions_len};
290 my $self = shift;
292 $self->{extension_data} = shift;
294 return $self->{extension_data};
298 my ($self, $ext_type, $ext_data) = @_;
299 $self->{extension_data}{$ext_type} = $ext_data;
303 my ($self, $ext_type) = @_;
304 delete $self->{extension_data}{$ext_type};